User can create group
This commit is contained in:
parent
d9027df5b5
commit
f6c482c06f
12 changed files with 117 additions and 31 deletions
11
features/group/create_group.feature
Normal file
11
features/group/create_group.feature
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue