summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-07-14 15:11:42 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-07-14 15:11:42 +0200
commit08b462b9b0e4795d1adf3a32d13514ca84bbe14b (patch)
tree3b64cfa898f752eba0301b2c1cb265fb1338ecd3 /spec
parent000ec953992c69679acfcd4f783ac0e2c9b71953 (diff)
downloadgitlab-ce-08b462b9b0e4795d1adf3a32d13514ca84bbe14b.tar.gz
Remove deprecated #heads method
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb35
1 files changed, 2 insertions, 33 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index 10fa5f4044b..f5893294e34 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -234,33 +234,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
it { expect(repository.bare?).to be_truthy }
end
- describe '#heads' do
- let(:heads) { repository.heads }
- subject { heads }
-
- it { is_expected.to be_kind_of Array }
-
- describe '#size' do
- subject { super().size }
- it { is_expected.to eq(SeedRepo::Repo::BRANCHES.size) }
- end
-
- context :head do
- subject { heads.first }
-
- describe '#name' do
- subject { super().name }
- it { is_expected.to eq("feature") }
- end
-
- context :commit do
- subject { heads.first.dereferenced_target.sha }
-
- it { is_expected.to eq("0b4bc9a49b562e85de7cc9e834518ea6828729b9") }
- end
- end
- end
-
describe '#ref_names' do
let(:ref_names) { repository.ref_names }
subject { ref_names }
@@ -521,7 +494,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
end
it "should refresh the repo's #heads collection" do
- head_names = @normal_repo.heads.map { |h| h.name }
+ head_names = @normal_repo.branches.map { |h| h.name }
expect(head_names).to include(new_branch)
end
@@ -542,7 +515,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
eq(normal_repo.rugged.branches["master"].target.oid)
)
- head_names = normal_repo.heads.map { |h| h.name }
+ head_names = normal_repo.branches.map { |h| h.name }
expect(head_names).not_to include(new_branch)
end
@@ -589,10 +562,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
expect(@repo.rugged.branches["feature"]).to be_nil
end
- it "should update the repo's #heads collection" do
- expect(@repo.heads).not_to include("feature")
- end
-
after(:all) do
FileUtils.rm_rf(TEST_MUTABLE_REPO_PATH)
ensure_seeds