diff options
author | Alex Denisov <1101.debian@gmail.com> | 2012-09-10 01:27:47 +0400 |
---|---|---|
committer | Alex Denisov <1101.debian@gmail.com> | 2012-09-10 01:27:47 +0400 |
commit | 1f240b09ed5f9f5476a863dd2f906398e5a9f0d4 (patch) | |
tree | 043a9a48f08507b96064cef157ff733ca89ce2b4 /features | |
parent | a86bd87afcb8ba8221aa72562a6591139fa763c0 (diff) |
User left project event added
Diffstat (limited to 'features')
-rw-r--r-- | features/dashboard/dashboard.feature | 9 | ||||
-rw-r--r-- | features/step_definitions/dashboard_steps.rb | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/features/dashboard/dashboard.feature b/features/dashboard/dashboard.feature index 8775e08154d..98bb49803f3 100644 --- a/features/dashboard/dashboard.feature +++ b/features/dashboard/dashboard.feature @@ -15,9 +15,14 @@ Feature: Dashboard And I click "Create Merge Request" link Then I see prefilled new Merge Request page - @current Scenario: I should see User joined Project event Given user with name "John Doe" joined project "Shop" When I visit dashboard page - Then I should see "John Doe joined Shop" event + Then I should see "John Doe joined project Shop" event + + Scenario: I should see User left Project event + Given user with name "John Doe" joined project "Shop" + And user with name "John Doe" left project "Shop" + When I visit dashboard page + Then I should see "John Doe left project Shop" event diff --git a/features/step_definitions/dashboard_steps.rb b/features/step_definitions/dashboard_steps.rb index 3771fb9c267..3ddc68e931c 100644 --- a/features/step_definitions/dashboard_steps.rb +++ b/features/step_definitions/dashboard_steps.rb @@ -120,6 +120,16 @@ Given /^user with name "(.*?)" joined project "(.*?)"$/ do |user_name, project_n ) end +Given /^user with name "(.*?)" left project "(.*?)"$/ do |user_name, project_name| + user = User.find_by_name user_name + project = Project.find_by_name project_name + Event.create( + project: project, + author_id: user.id, + action: Event::Left + ) +end + Then /^I should see "(.*?)" event$/ do |event_text| page.should have_content(event_text) end |