summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Denisov <1101.debian@gmail.com>2012-11-28 19:59:19 +0200
committerAlex Denisov <1101.debian@gmail.com>2012-11-28 19:59:19 +0200
commit15a72a3b87551e599ce8bd7b6f479310f70c1260 (patch)
tree194c6acda6d6d0dac2935cd489f9d4c2edffdc2e
parentc873cf81f61d644639b459b2fde1267a41050bc1 (diff)
downloadgitlab-ce-15a72a3b87551e599ce8bd7b6f479310f70c1260.tar.gz
Spinach test added
-rw-r--r--features/dashboard/dashboard.feature6
-rw-r--r--features/steps/dashboard/dashboard.rb10
2 files changed, 16 insertions, 0 deletions
diff --git a/features/dashboard/dashboard.feature b/features/dashboard/dashboard.feature
index 24296f46579..972f8e36609 100644
--- a/features/dashboard/dashboard.feature
+++ b/features/dashboard/dashboard.feature
@@ -15,6 +15,12 @@ Feature: Dashboard
And I visit dashboard page
Then I should see groups list
+ Scenario: I should see correct projects count
+ Given I have group with projects
+ And group has a projects that does not belongs to me
+ When I visit dashboard page
+ Then I should see 1 project at group list
+
Scenario: I should see last push widget
Then I should see last push widget
And I click "Create Merge Request" link
diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb
index 99c48738876..775a721f1a4 100644
--- a/features/steps/dashboard/dashboard.rb
+++ b/features/steps/dashboard/dashboard.rb
@@ -103,4 +103,14 @@ class Dashboard < Spinach::FeatureSteps
page.should have_link group.name
end
end
+
+ And 'group has a projects that does not belongs to me' do
+ @forbidden_project1 = create(:project, group: @group)
+ @forbidden_project2 = create(:project, group: @group)
+ end
+
+ Then 'I should see 1 project at group list' do
+ page.find('span.last_activity/span').should have_content('1')
+ end
+
end