BigW Consortium Gitlab

archived.rb 895 Bytes
Newer Older
1
class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
2 3 4 5 6
  include SharedAuthentication
  include SharedProject
  include SharedPaths

  When 'project "Forum" is archived' do
skv committed
7
    project = Project.find_by(name: "Forum")
8 9 10 11
    project.update_attribute(:archived, true)
  end

  When 'project "Shop" is archived' do
skv committed
12
    project = Project.find_by(name: "Shop")
13 14 15 16
    project.update_attribute(:archived, true)
  end

  When 'I visit project "Forum" page' do
skv committed
17
    project = Project.find_by(name: "Forum")
Vinnie Okada committed
18
    visit namespace_project_path(project.namespace, project)
19 20
  end

21
  step 'I should not see "Archived"' do
22
    expect(page).not_to have_content "Archived"
23 24
  end

25
  step 'I should see "Archived"' do
26
    expect(page).to have_content "Archived"
27 28 29 30 31 32 33 34 35 36
  end

  When 'I set project archived' do
    click_link "Archive"
  end

  When 'I set project unarchived' do
    click_link "Unarchive"
  end

37
end