Commit 5401d20d authored by Robert May's avatar Robert May

Add missing repository unit test

Noticed this method was missing a unit test, so I added a simple one
to cover it.
parent 82304fbb
......@@ -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