Commit 785968a3 authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'add-missing-unit-test-on-repository' into 'master'

Add missing repository unit test

See merge request gitlab-org/gitlab!23601
parents d0a3f1bc 5401d20d
......@@ -482,6 +482,18 @@ describe Repository do
end
end
describe "#root_ref_sha" do
let(:commit) { double("commit", sha: "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3") }
subject { repository.root_ref_sha }
before do
allow(repository).to receive(:commit).with(repository.root_ref) { commit }
end
it { is_expected.to eq(commit.sha) }
end
describe '#can_be_merged?' do
context 'mergeable branches' do
subject { repository.can_be_merged?('0b4bc9a49b562e85de7cc9e834518ea6828729b9', 'master') }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment