debian-mirror-gitlab/spec/models/project_group_link_spec.rb

18 lines
521 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
require 'spec_helper'
describe ProjectGroupLink do
describe "Associations" do
it { should belong_to(:group) }
it { should belong_to(:project) }
end
describe "Validation" do
let!(:project_group_link) { create(:project_group_link) }
it { should validate_presence_of(:project_id) }
it { should validate_uniqueness_of(:group_id).scoped_to(:project_id).with_message(/already shared/) }
2016-11-03 12:29:30 +05:30
it { should validate_presence_of(:group) }
2016-06-02 11:05:42 +05:30
it { should validate_presence_of(:group_access) }
end
end