Fix stop action

This commit is contained in:
Kamil Trzcinski 2017-02-07 16:00:44 +01:00
parent bc66944248
commit 0886b0fe98
No known key found for this signature in database
GPG Key ID: 4505F5C7E12C6A5A
1 changed files with 3 additions and 13 deletions

View File

@ -56,10 +56,8 @@ feature 'Environments page', :feature, :js do
context 'for available environment' do
given(:environment) { create(:environment, project: project, state: :available) }
scenario 'does allow to stop environment' do
click_link('Stop')
expect(page).to have_content(environment.name.titleize)
scenario 'does not shows stop button' do
expect(page).not_to have_selector('.stop-env-link')
end
end
@ -67,7 +65,7 @@ feature 'Environments page', :feature, :js do
given(:environment) { create(:environment, project: project, state: :stopped) }
scenario 'does not shows stop button' do
expect(page).not_to have_link('Stop')
expect(page).not_to have_selector('.stop-env-link')
end
end
end
@ -186,14 +184,6 @@ feature 'Environments page', :feature, :js do
expect(page).not_to have_terminal_button
end
end
context 'whitout stop action' do
scenario 'does allow to stop environment' do
click_link('Stop')
expect(page).to have_content(environment.name.capitalize)
end
end
end
end
end