diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-15 13:07:06 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-15 13:07:06 +0300 |
commit | 00526440092bb82beb86b87376dd1ea6178bf05f (patch) | |
tree | 1b82343b9ca6d3f8cdad184fab98953b8006d1dd /spec/features | |
parent | 2541e50d7ce64bb402d06dc9d75567b78282c7b7 (diff) |
Improve forms and specs
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/environments_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/features/environments_spec.rb b/spec/features/environments_spec.rb index b73bb30e216..8002b793986 100644 --- a/spec/features/environments_spec.rb +++ b/spec/features/environments_spec.rb @@ -107,7 +107,7 @@ describe 'Environments' do context 'for valid name' do before do - fill_in('Environment name', with: 'production') + fill_in('Name', with: 'production') click_on 'Create environment' end @@ -118,7 +118,7 @@ describe 'Environments' do context 'for invalid name' do before do - fill_in('Environment name', with: 'name with spaces') + fill_in('Name', with: 'name with spaces') click_on 'Create environment' end @@ -140,7 +140,9 @@ describe 'Environments' do before { visit namespace_project_environment_path(project.namespace, project, environment) } - context 'when logged as developer' do + context 'when logged as master' do + let(:role) { :master } + before { click_link 'Destroy' } it 'does not have environment' do @@ -148,8 +150,8 @@ describe 'Environments' do end end - context 'when logged as reporter' do - let(:role) { :reporter } + context 'when logged as developer' do + let(:role) { :developer } it 'does not have a Destroy link' do expect(page).not_to have_link('Destroy') |