2013-11-29 11:10:59 -05:00
|
|
|
class ProjectArchived < Spinach::FeatureSteps
|
|
|
|
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")
|
2013-11-29 11:10:59 -05:00
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should not see "Archived"' do
|
|
|
|
page.should_not have_content "Archived"
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see "Archived"' do
|
|
|
|
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
|