2014-09-22 10:30:25 -04:00
|
|
|
class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
|
2013-11-29 11:10:59 -05:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedProject
|
|
|
|
include SharedPaths
|
|
|
|
|
|
|
|
When 'project "Forum" is archived' do
|
2014-01-19 13:55:59 -05:00
|
|
|
project = Project.find_by(name: "Forum")
|
2013-11-29 11:10:59 -05:00
|
|
|
project.update_attribute(:archived, true)
|
|
|
|
end
|
|
|
|
|
|
|
|
When 'project "Shop" is archived' do
|
2014-01-19 13:55:59 -05:00
|
|
|
project = Project.find_by(name: "Shop")
|
2013-11-29 11:10:59 -05:00
|
|
|
project.update_attribute(:archived, true)
|
|
|
|
end
|
|
|
|
|
|
|
|
When 'I visit project "Forum" page' do
|
2014-01-19 13:55:59 -05:00
|
|
|
project = Project.find_by(name: "Forum")
|
2015-01-24 13:02:58 -05:00
|
|
|
visit namespace_project_path(project.namespace, project)
|
2013-11-29 11:10:59 -05:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should not see "Archived"' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).not_to have_content "Archived"
|
2013-11-29 11:10:59 -05:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I should see "Archived"' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(page).to have_content "Archived"
|
2013-11-29 11:10:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
When 'I set project archived' do
|
|
|
|
click_link "Archive"
|
|
|
|
end
|
|
|
|
|
|
|
|
When 'I set project unarchived' do
|
|
|
|
click_link "Unarchive"
|
|
|
|
end
|
2014-06-21 05:18:57 -04:00
|
|
|
end
|