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

37 lines
894 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
2015-09-11 14:41:01 +05:30
expect(page).not_to have_content "Archived"
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
step 'I should see "Archived"' do
2015-09-11 14:41:01 +05:30
expect(page).to have_content "Archived"
2014-09-02 18:07:02 +05:30
end
When 'I set project archived' do
click_link "Archive"
end
When 'I set project unarchived' do
click_link "Unarchive"
end
end