diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-11-22 20:16:30 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-12-10 20:28:36 +0300 |
commit | 2c9bb135057f4fea43aa0be5b94354f288d5070f (patch) | |
tree | 99d4659d9b27a849ae692f2d2dd8cd3bf71d1ab8 /spec/features/projects/settings | |
parent | 26b0fe8d2e16adf4106859ed578dd2352cde412b (diff) |
Fixed tests
Grab permissions description from backend
Review changes
Added unit tests
Diffstat (limited to 'spec/features/projects/settings')
-rw-r--r-- | spec/features/projects/settings/visibility_settings_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/features/projects/settings/visibility_settings_spec.rb b/spec/features/projects/settings/visibility_settings_spec.rb index 86cc3fb886e..cef315ac9cd 100644 --- a/spec/features/projects/settings/visibility_settings_spec.rb +++ b/spec/features/projects/settings/visibility_settings_spec.rb @@ -1,5 +1,4 @@ require 'spec_helper' -require 'byebug' feature 'Visibility settings', feature: true, js: true do let(:user) { create(:user) } @@ -13,6 +12,7 @@ feature 'Visibility settings', feature: true, js: true do scenario 'project visibility select is available' do visibility_select_container = find('.js-visibility-select') + expect(visibility_select_container.find('.visibility-select').value).to eq project.visibility_level.to_s expect(visibility_select_container).to have_content 'The project can be cloned without any authentication.' end @@ -21,6 +21,7 @@ feature 'Visibility settings', feature: true, js: true do visibility_select_container = find('.js-visibility-select') visibility_select = visibility_select_container.find('.visibility-select') visibility_select.select('Private') + expect(visibility_select.value).to eq '0' expect(visibility_select_container).to have_content 'Project access must be granted explicitly to each user.' end @@ -37,6 +38,7 @@ feature 'Visibility settings', feature: true, js: true do scenario 'project visibility is locked' do visibility_select_container = find('.js-visibility-select') + expect(visibility_select_container).not_to have_select '.visibility-select' expect(visibility_select_container).to have_content 'Public' expect(visibility_select_container).to have_content 'The project can be cloned without any authentication.' |