diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-07-28 15:26:00 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-07-28 15:26:00 +0100 |
commit | dc04fdc1a3165134fc9245e9a591daceee857ef4 (patch) | |
tree | e3b01475f2e224cd1595167c9a5dd0d0dc013a89 /spec/lib/gitlab/workhorse_spec.rb | |
parent | ec302c6c0cf7d4b3a19bea43ce380dbaa60b363d (diff) | |
parent | 48c51e207e4cba8a69e4ca65cba1e169d384cefa (diff) | |
download | gitlab-ce-dc04fdc1a3165134fc9245e9a591daceee857ef4.tar.gz |
Merge remote-tracking branch 'origin/master' into ide
Diffstat (limited to 'spec/lib/gitlab/workhorse_spec.rb')
-rw-r--r-- | spec/lib/gitlab/workhorse_spec.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb index 124f66a6e0e..654397ccffb 100644 --- a/spec/lib/gitlab/workhorse_spec.rb +++ b/spec/lib/gitlab/workhorse_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::Workhorse, lib: true do +describe Gitlab::Workhorse do let(:project) { create(:project, :repository) } let(:repository) { project.repository } @@ -63,13 +63,13 @@ describe Gitlab::Workhorse, lib: true do end context 'without ca_pem' do - subject { Gitlab::Workhorse.terminal_websocket(terminal) } + subject { described_class.terminal_websocket(terminal) } it { is_expected.to eq(workhorse) } end context 'with ca_pem' do - subject { Gitlab::Workhorse.terminal_websocket(terminal(ca_pem: "foo")) } + subject { described_class.terminal_websocket(terminal(ca_pem: "foo")) } it { is_expected.to eq(workhorse(ca_pem: "foo")) } end @@ -237,7 +237,8 @@ describe Gitlab::Workhorse, lib: true do context 'when action is not enabled by feature flag' do it 'does not include Gitaly params in the returned value' do - allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag).and_return(false) + status_opt_out = Gitlab::GitalyClient::MigrationStatus::OPT_OUT + allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(feature_flag, status: status_opt_out).and_return(false) expect(subject).not_to include(gitaly_params) end @@ -325,7 +326,7 @@ describe Gitlab::Workhorse, lib: true do subject { described_class.send_git_blob(repository, blob) } - context 'when Gitaly project_raw_show feature is enabled' do + context 'when Gitaly workhorse_raw_show feature is enabled' do it 'sets the header correctly' do key, command, params = decode_workhorse_header(subject) @@ -345,7 +346,7 @@ describe Gitlab::Workhorse, lib: true do end end - context 'when Gitaly project_raw_show feature is disabled', skip_gitaly_mock: true do + context 'when Gitaly workhorse_raw_show feature is disabled', skip_gitaly_mock: true do it 'sets the header correctly' do key, command, params = decode_workhorse_header(subject) |