summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-02 09:20:22 +0100
committerFatih Acet <acetfatih@gmail.com>2016-08-12 23:24:46 +0300
commit261d47bce9d7cc80b4c2068cb612411fe51530ee (patch)
tree2f913169220c9e9e6d4e5e1610b085dedbdf864e /spec/lib
parent6f3501fe252404b342984514b1b784ffa73edbd0 (diff)
downloadgitlab-ce-261d47bce9d7cc80b4c2068cb612411fe51530ee.tar.gz
Fix specs
- Add match line header to expected result for `File#sections`. - Lowercase CSS colours. - Remove unused `diff_refs` keyword argument. - Rename `parent` -> `parent_file`, to be more explicit. - Skip an iteration when highlighting.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/conflict/file_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/lib/gitlab/conflict/file_spec.rb b/spec/lib/gitlab/conflict/file_spec.rb
index 735b5b34623..dd3ddc70cf7 100644
--- a/spec/lib/gitlab/conflict/file_spec.rb
+++ b/spec/lib/gitlab/conflict/file_spec.rb
@@ -5,12 +5,11 @@ describe Gitlab::Conflict::File, lib: true do
let(:repository) { project.repository }
let(:rugged) { repository.rugged }
let(:their_commit) { rugged.branches['conflict-a'].target }
- let(:diff_refs) { Gitlab::Diff::DiffRefs.new(base_sha: their_commit.oid, head_sha: our_commit.oid) }
let(:our_commit) { rugged.branches['conflict-b'].target }
let(:index) { rugged.merge_commits(our_commit, their_commit) }
let(:conflict) { index.conflicts.last }
let(:merge_file_result) { index.merge_file('files/ruby/regex.rb') }
- let(:conflict_file) { Gitlab::Conflict::File.new(merge_file_result, conflict, diff_refs: diff_refs, repository: repository) }
+ let(:conflict_file) { Gitlab::Conflict::File.new(merge_file_result, conflict, repository: repository) }
describe '#resolve_lines' do
let(:section_keys) { conflict_file.sections.map { |section| section[:id] }.compact }
@@ -92,7 +91,7 @@ describe Gitlab::Conflict::File, lib: true do
expect(section[:conflict]).to be_falsey
expect(match_line.type).to eq('match')
- expect(match_line.text).to eq('@@ -46,53 +46,53 @@')
+ expect(match_line.text).to eq('@@ -46,53 +46,53 @@ module Gitlab')
end
it 'does not return match lines when there is no gap between sections' do