Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
9cabe043
Commit
9cabe043
authored
Sep 27, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for: Profile -> History
parent
68f4b597
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
app/models/event.rb
app/models/event.rb
+1
-0
features/profile/profile.feature
features/profile/profile.feature
+5
-0
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+8
-0
features/steps/shared/authentication.rb
features/steps/shared/authentication.rb
+4
-0
spec/factories.rb
spec/factories.rb
+6
-0
No files found.
app/models/event.rb
View file @
9cabe043
...
...
@@ -20,6 +20,7 @@ class Event < ActiveRecord::Base
delegate
:title
,
to: :issue
,
prefix:
true
,
allow_nil:
true
delegate
:title
,
to: :merge_request
,
prefix:
true
,
allow_nil:
true
belongs_to
:author
,
class_name:
"User"
belongs_to
:project
belongs_to
:target
,
polymorphic:
true
...
...
features/profile/profile.feature
View file @
9cabe043
...
...
@@ -20,3 +20,8 @@ Feature: Profile
Given
I visit profile account page
Then
I reset my token
And
I should see new token
Scenario
:
I
visit history tab
Given
I have activity
When
I visit profile history page
Then
I should see my activity
features/steps/profile/profile.rb
View file @
9cabe043
...
...
@@ -41,4 +41,12 @@ class Profile < Spinach::FeatureSteps
find
(
"#token"
).
value
.
should_not
==
@old_token
find
(
"#token"
).
value
.
should
==
@user
.
reload
.
private_token
end
Given
'I have activity'
do
Factory
:closed_issue_event
,
author:
current_user
end
Then
'I should see my activity'
do
page
.
should
have_content
"
#{
current_user
.
name
}
closed issue"
end
end
features/steps/shared/authentication.rb
View file @
9cabe043
...
...
@@ -11,4 +11,8 @@ module SharedAuthentication
Given
'I sign in as an admin'
do
login_as
:admin
end
def
current_user
@user
||
User
.
first
end
end
spec/factories.rb
View file @
9cabe043
...
...
@@ -78,6 +78,12 @@ FactoryGirl.define do
end
factory
:event
do
factory
:closed_issue_event
do
project
action
Event
::
Closed
target
factory: :closed_issue
author
factory: :user
end
end
factory
:key
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment