debian-mirror-gitlab/features/steps/project/archived.rb

38 lines
887 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
2014-09-02 18:07:02 +05:30
include SharedAuthentication
include SharedProject
include SharedPaths
When 'project "Forum" is archived' do
project = Project.find_by(name: "Forum")
project.update_attribute(:archived, true)
end
When 'project "Shop" is archived' do
project = Project.find_by(name: "Shop")
project.update_attribute(:archived, true)
end
When 'I visit project "Forum" page' do
project = Project.find_by(name: "Forum")
2015-04-26 12:48:37 +05:30
visit namespace_project_path(project.namespace, project)
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I should not see "Archived"' do
2014-09-02 18:07:02 +05:30
page.should_not have_content "Archived"
end
2015-04-26 12:48:37 +05:30
step 'I should see "Archived"' do
2014-09-02 18:07:02 +05:30
page.should have_content "Archived"
end
When 'I set project archived' do
click_link "Archive"
end
When 'I set project unarchived' do
click_link "Unarchive"
end
end