summaryrefslogtreecommitdiff
path: root/spec/models/project_group_link_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-10 13:40:11 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-10 13:40:11 +0200
commit6120dc261ab3700b7a19f683559494319b6a1b75 (patch)
tree9b9c9b0c5664f03af9732ebf3c0d01079533df94 /spec/models/project_group_link_spec.rb
parent6c477d5b9496829eb5cb56ef32a0dd813be7dc16 (diff)
parentcd735170d3bc5e71d46ba1e37249ae713b7842f8 (diff)
downloadgitlab-ce-6120dc261ab3700b7a19f683559494319b6a1b75.tar.gz
Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (587 commits) Increase GitLab QA screenshots size Fix QA test scenario for creating a new project Configure headless chrome screenshots correctly Allow passing exceptions when creating project services Also inject new route helpers into includers of GitlabRoutingHelper Remove many N+1 queries with merge requests API fix milestones finder failing spec Make wrong migrations idempotent Remove double border on last group row Update tests to test what the component renders and what the clicks calls Username and password are no longer stripped from import url on import Change `sign_out` usage to `gitlab_sign_out` in one spec Send Gitaly Repository with /api/internal/allowed Resolve "Liberation Mono weird font rendering on Fedora/openSUSE/other Linux distros" Force mobile view for admin projects fix spec Mark a subgroup-related spec as PostgreSQL-only Use vue .prevent to prevent the click Add members-list class to admin projects page Fix another typo in SHA attribute spec ... Conflicts: db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb db/schema.rb lib/gitlab/background_migration/migrate_build_stage_id_reference.rb spec/migrations/migrate_stage_id_reference_in_background_spec.rb
Diffstat (limited to 'spec/models/project_group_link_spec.rb')
-rw-r--r--spec/models/project_group_link_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/models/project_group_link_spec.rb b/spec/models/project_group_link_spec.rb
index 4161b9158b1..d68d8b719cd 100644
--- a/spec/models/project_group_link_spec.rb
+++ b/spec/models/project_group_link_spec.rb
@@ -2,8 +2,8 @@ require 'spec_helper'
describe ProjectGroupLink do
describe "Associations" do
- it { should belong_to(:group) }
- it { should belong_to(:project) }
+ it { is_expected.to belong_to(:group) }
+ it { is_expected.to belong_to(:project) }
end
describe "Validation" do
@@ -12,10 +12,10 @@ describe ProjectGroupLink do
let(:project) { create(:project, group: group) }
let!(:project_group_link) { create(:project_group_link, project: project) }
- 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) }
- it { should validate_presence_of(:group_access) }
+ it { is_expected.to validate_presence_of(:project_id) }
+ it { is_expected.to validate_uniqueness_of(:group_id).scoped_to(:project_id).with_message(/already shared/) }
+ it { is_expected.to validate_presence_of(:group) }
+ it { is_expected.to validate_presence_of(:group_access) }
it "doesn't allow a project to be shared with the group it is in" do
project_group_link.group = group