Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-24 19:47:09 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-24 19:47:09 +0400
commitf6c482c06f48449e7dcff34455b5bbdfbd8f6c7b (patch)
tree5524251aeea0ae6f00a4ecb8775fbf542d98eab5 /features
parentd9027df5b55f2eb82f1a71e96412c5e802909090 (diff)
User can create group
Diffstat (limited to 'features')
-rw-r--r--features/group/create_group.feature11
-rw-r--r--features/steps/group/group.rb18
2 files changed, 29 insertions, 0 deletions
diff --git a/features/group/create_group.feature b/features/group/create_group.feature
new file mode 100644
index 00000000000..b77f3599e6a
--- /dev/null
+++ b/features/group/create_group.feature
@@ -0,0 +1,11 @@
+Feature: Groups
+ Background:
+ Given I sign in as a user
+
+ Scenario: Create a group from dasboard
+ Given I have group with projects
+ And I visit dashboard page
+ When I click new group link
+ And submit form with new group info
+ Then I should be redirected to group page
+ And I should see newly created group
diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb
index 04d8c874b3e..c6c6b4b5e5b 100644
--- a/features/steps/group/group.rb
+++ b/features/steps/group/group.rb
@@ -64,6 +64,24 @@ class Groups < Spinach::FeatureSteps
author: current_user
end
+ When 'I click new group link' do
+ click_link "New Group"
+ end
+
+ And 'submit form with new group info' do
+ fill_in 'group_name', :with => 'Samurai'
+ click_button "Create group"
+ end
+
+ Then 'I should see newly created group' do
+ page.should have_content "Samurai"
+ page.should have_content "You will only see events from projects in this group"
+ end
+
+ Then 'I should be redirected to group page' do
+ current_path.should == group_path(Group.last)
+ end
+
protected
def current_group