Commit 15a72a3b87551e599ce8bd7b6f479310f70c1260
1 parent
c873cf81
Exists in
master
and in
4 other branches
Spinach test added
Showing
2 changed files
with
16 additions
and
0 deletions
Show diff stats
features/dashboard/dashboard.feature
... | ... | @@ -15,6 +15,12 @@ Feature: Dashboard |
15 | 15 | And I visit dashboard page |
16 | 16 | Then I should see groups list |
17 | 17 | |
18 | + Scenario: I should see correct projects count | |
19 | + Given I have group with projects | |
20 | + And group has a projects that does not belongs to me | |
21 | + When I visit dashboard page | |
22 | + Then I should see 1 project at group list | |
23 | + | |
18 | 24 | Scenario: I should see last push widget |
19 | 25 | Then I should see last push widget |
20 | 26 | And I click "Create Merge Request" link | ... | ... |
features/steps/dashboard/dashboard.rb
... | ... | @@ -103,4 +103,14 @@ class Dashboard < Spinach::FeatureSteps |
103 | 103 | page.should have_link group.name |
104 | 104 | end |
105 | 105 | end |
106 | + | |
107 | + And 'group has a projects that does not belongs to me' do | |
108 | + @forbidden_project1 = create(:project, group: @group) | |
109 | + @forbidden_project2 = create(:project, group: @group) | |
110 | + end | |
111 | + | |
112 | + Then 'I should see 1 project at group list' do | |
113 | + page.find('span.last_activity/span').should have_content('1') | |
114 | + end | |
115 | + | |
106 | 116 | end | ... | ... |