diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-10-18 13:58:11 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-10-18 13:58:11 +0300 |
commit | b8a49e574a5cf513042f8e12d536d25fe08da801 (patch) | |
tree | b78c123270a64a5cb01ecef1008a0e9e52f67240 /spec/features/projects/settings/pipelines_settings_spec.rb | |
parent | 4622f7e298edeb7211b94f3634f79dfc78db3918 (diff) |
Move specs for project pipeline settings page
Diffstat (limited to 'spec/features/projects/settings/pipelines_settings_spec.rb')
-rw-r--r-- | spec/features/projects/settings/pipelines_settings_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/projects/settings/pipelines_settings_spec.rb b/spec/features/projects/settings/pipelines_settings_spec.rb new file mode 100644 index 00000000000..76cb240ea98 --- /dev/null +++ b/spec/features/projects/settings/pipelines_settings_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +feature "Pipelines settings", feature: true do + include GitlabRoutingHelper + + let(:project) { create(:empty_project) } + let(:user) { create(:user) } + let(:role) { :developer } + + background do + login_as(user) + project.team << [user, role] + visit namespace_project_pipelines_settings_path(project.namespace, project) + end + + context 'for developer' do + given(:role) { :developer } + + scenario 'to be disallowed to view' do + expect(page.status_code).to eq(404) + end + end + + context 'for master' do + given(:role) { :master } + + scenario 'be allowed to change', js: true do + fill_in('Test coverage parsing', with: 'coverage_regex') + click_on 'Save changes' + + expect(page.status_code).to eq(200) + expect(page).to have_button('Save changes', disabled: false) + expect(page).to have_field('Test coverage parsing', with: 'coverage_regex') + end + end +end |