Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 00:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 00:08:48 +0300
commit600ca978129e3ccab758f57d60786cefe66ad775 (patch)
treea3675da98c7c245adf7e93f82f9c26a38cc3c29d /spec/lib/gitlab/diff
parent571d993b49313dd806bd3f6af16d36c26d9d28ca (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/diff')
-rw-r--r--spec/lib/gitlab/diff/file_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/diff/file_spec.rb b/spec/lib/gitlab/diff/file_spec.rb
index 716fc8ae987..c468af4db68 100644
--- a/spec/lib/gitlab/diff/file_spec.rb
+++ b/spec/lib/gitlab/diff/file_spec.rb
@@ -347,6 +347,16 @@ describe Gitlab::Diff::File do
end
describe '#simple_viewer' do
+ context 'when the file is collapsed' do
+ before do
+ allow(diff_file).to receive(:collapsed?).and_return(true)
+ end
+
+ it 'returns a Collapsed viewer' do
+ expect(diff_file.simple_viewer).to be_a(DiffViewer::Collapsed)
+ end
+ end
+
context 'when the file is not diffable' do
before do
allow(diff_file).to receive(:diffable?).and_return(false)