diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-09-27 23:23:11 +0300 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-09-27 23:23:11 +0300 |
commit | 9cabe04368024f44881e4269a008156f1629ab86 (patch) | |
tree | 56e27d7619690536fcda54c57acfb105f2b830dd /features | |
parent | 68f4b59738b43d9d6969528188ec74a87546a29f (diff) | |
download | gitlab-ce-9cabe04368024f44881e4269a008156f1629ab86.tar.gz |
tests for: Profile -> History
Diffstat (limited to 'features')
-rw-r--r-- | features/profile/profile.feature | 5 | ||||
-rw-r--r-- | features/steps/profile/profile.rb | 8 | ||||
-rw-r--r-- | features/steps/shared/authentication.rb | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/features/profile/profile.feature b/features/profile/profile.feature index 134cabb506f..d07a6db1a79 100644 --- a/features/profile/profile.feature +++ b/features/profile/profile.feature @@ -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 diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb index d3261a16690..605936ba55e 100644 --- a/features/steps/profile/profile.rb +++ b/features/steps/profile/profile.rb @@ -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 diff --git a/features/steps/shared/authentication.rb b/features/steps/shared/authentication.rb index 2add91617fe..8c501bbc537 100644 --- a/features/steps/shared/authentication.rb +++ b/features/steps/shared/authentication.rb @@ -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 |