Skip to content

Commit 7842ff8

Browse files
author
root
committed
Add test for ProtectBranche uniqueness
1 parent 595c315 commit 7842ff8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: spec/models/repository_protected_branche_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def build_protected_branch(opts = {})
3131
it { should validate_presence_of(:permissions) }
3232
it { should validate_presence_of(:user_list) }
3333

34+
it { should validate_uniqueness_of(:path).scoped_to([:permissions, :repository_id]) }
35+
3436
it { should validate_inclusion_of(:permissions).in_array(%w(RW RW+)) }
3537

3638
## Serializations

0 commit comments

Comments
 (0)