BigW Consortium Gitlab

group.rb 727 Bytes
Newer Older
1
class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
2 3 4 5 6
  include SharedAuthentication
  include SharedGroup
  include SharedPaths
  include SharedUser

7 8 9 10 11 12 13 14 15 16 17
  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
18
    expect(current_path).to eq group_path(Group.find_by(name: 'Samurai'))
19 20 21
  end

  step 'I should see newly created group "Samurai"' do
22 23
    expect(page).to have_content "Samurai"
    expect(page).to have_content "Tokugawa Shogunate"
24
  end
25
end