2015-03-08 23:52:22 -04:00
|
|
|
class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
|
2014-02-07 11:59:55 -05:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedGroup
|
|
|
|
include SharedPaths
|
|
|
|
include SharedUser
|
|
|
|
|
2015-03-10 18:19:28 -04:00
|
|
|
step 'I click new group link' do
|
|
|
|
click_link "New Group"
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'submit form with new group "Samurai" info' do
|
|
|
|
fill_in 'group_path', with: 'Samurai'
|
|
|
|
fill_in 'group_description', with: 'Tokugawa Shogunate'
|
|
|
|
click_button "Create group"
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should be redirected to group "Samurai" page' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(current_path).to eq group_path(Group.find_by(name: 'Samurai'))
|
2015-03-10 18:19:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see newly created group "Samurai"' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "Samurai"
|
|
|
|
expect(page).to have_content "Tokugawa Shogunate"
|
2015-03-10 18:19:28 -04:00
|
|
|
end
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|