diff options
author | Rémy Coutable <remy@rymai.me> | 2016-05-09 17:48:48 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-05-09 17:48:48 +0300 |
commit | d4d34b161b41539567332d45527bb10c9f0665e3 (patch) | |
tree | 484145a78e7aa113ca631a68c1aab45097394c66 /spec/helpers | |
parent | bdfe6dc319571dbae8340a7132e5bd6a8ea06764 (diff) | |
parent | f18ec70743375024aa7ec7bb86c437ca9198e729 (diff) |
Merge branch 'rs-backport-ee-372' into 'master'
Backport changes from gitlab-org/gitlab-ee!372
Mostly replaces several Spinach tests with RSpec Feature tests.
See merge request !4043
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 29bcb8c5892..ac5af8740dc 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -88,18 +88,18 @@ describe ProjectsHelper do end describe 'default_clone_protocol' do - describe 'using HTTP' do + context 'when user is not logged in and gitlab protocol is HTTP' do it 'returns HTTP' do - expect(helper).to receive(:current_user).and_return(nil) + allow(helper).to receive(:current_user).and_return(nil) expect(helper.send(:default_clone_protocol)).to eq('http') end end - describe 'using HTTPS' do + context 'when user is not logged in and gitlab protocol is HTTPS' do it 'returns HTTPS' do - allow(Gitlab.config.gitlab).to receive(:protocol).and_return('https') - expect(helper).to receive(:current_user).and_return(nil) + stub_config_setting(protocol: 'https') + allow(helper).to receive(:current_user).and_return(nil) expect(helper.send(:default_clone_protocol)).to eq('https') end |