Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_group_link_spec.rb « models « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2fa6715fcaf67a3cab146207861f0c82e3925ed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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/) }
    it { should validate_presence_of(:group_id) }
    it { should validate_presence_of(:group_access) }
  end
end