Use existing methods for branch names: Ex use @repository.branch_names instead of @repository.heads.map(&:name)
This commit is contained in:
parent
025e41576e
commit
71b0f8ea0b
5 changed files with 32 additions and 13 deletions
|
@ -233,7 +233,7 @@ describe Project do
|
|||
|
||||
it "should be true for projects with external issues tracker if issues enabled" do
|
||||
ext_project.can_have_issues_tracker_id?.should be_true
|
||||
end
|
||||
end
|
||||
|
||||
it "should be false for projects with internal issue tracker if issues enabled" do
|
||||
project.can_have_issues_tracker_id?.should be_false
|
||||
|
@ -247,4 +247,15 @@ describe Project do
|
|||
ext_project.can_have_issues_tracker_id?.should be_false
|
||||
end
|
||||
end
|
||||
|
||||
describe :open_branches do
|
||||
let(:project) { create(:project) }
|
||||
|
||||
before do
|
||||
project.protected_branches.create(name: 'master')
|
||||
end
|
||||
|
||||
it { project.open_branches.map(&:name).should include('bootstrap') }
|
||||
it { project.open_branches.map(&:name).should_not include('master') }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue