summaryrefslogtreecommitdiff
path: root/spec/models/commit_spec.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-03-28 22:23:45 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-04-11 16:00:44 -0300
commitd6cc8feb6ce0a8e39a1bc8830b932155713357da (patch)
treee06ffc7ac8168f1857d9ee92bc8e4bcdc123810e /spec/models/commit_spec.rb
parent5e1a802b15af4ba991f9ed85a691f1a925cc0edf (diff)
downloadgitlab-ce-d6cc8feb6ce0a8e39a1bc8830b932155713357da.tar.gz
Setup and run a Gitaly server for testing if GitalyClient is enabledgitaly-testing
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r--spec/models/commit_spec.rb55
1 files changed, 28 insertions, 27 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb
index 980a1b70ef5..ce31c8ed94c 100644
--- a/spec/models/commit_spec.rb
+++ b/spec/models/commit_spec.rb
@@ -389,31 +389,32 @@ eos
end
end
- describe '#raw_diffs' do
- context 'Gitaly commit_raw_diffs feature enabled' do
- before do
- allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(:commit_raw_diffs).and_return(true)
- end
-
- context 'when a truthy deltas_only is not passed to args' do
- it 'fetches diffs from Gitaly server' do
- expect(Gitlab::GitalyClient::Commit).to receive(:diff_from_parent).
- with(commit)
-
- commit.raw_diffs
- end
- end
-
- context 'when a truthy deltas_only is passed to args' do
- it 'fetches diffs using Rugged' do
- opts = { deltas_only: true }
-
- expect(Gitlab::GitalyClient::Commit).not_to receive(:diff_from_parent)
- expect(commit.raw).to receive(:diffs).with(opts)
-
- commit.raw_diffs(opts)
- end
- end
- end
- end
+ # describe '#raw_diffs' do
+ # TODO: Uncomment when feature is reenabled
+ # context 'Gitaly commit_raw_diffs feature enabled' do
+ # before do
+ # allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(:commit_raw_diffs).and_return(true)
+ # end
+ #
+ # context 'when a truthy deltas_only is not passed to args' do
+ # it 'fetches diffs from Gitaly server' do
+ # expect(Gitlab::GitalyClient::Commit).to receive(:diff_from_parent).
+ # with(commit)
+ #
+ # commit.raw_diffs
+ # end
+ # end
+ #
+ # context 'when a truthy deltas_only is passed to args' do
+ # it 'fetches diffs using Rugged' do
+ # opts = { deltas_only: true }
+ #
+ # expect(Gitlab::GitalyClient::Commit).not_to receive(:diff_from_parent)
+ # expect(commit.raw).to receive(:diffs).with(opts)
+ #
+ # commit.raw_diffs(opts)
+ # end
+ # end
+ # end
+ # end
end