diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-07 07:04:21 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-07 07:04:21 +0000 |
commit | eebd18c3ac6a77e29693c8e1892782acdf20e262 (patch) | |
tree | be50fd759672288bbda8694d49c0f8c43563d175 /spec/models | |
parent | 1d749356c30bc18be5805dac7bc49565782ec30d (diff) | |
parent | bf6961cad85ab9a60f37f9b2974fb7bdd3975810 (diff) | |
download | gitlab-ce-eebd18c3ac6a77e29693c8e1892782acdf20e262.tar.gz |
Merge branch '2563-backport-ee1942' into 'master'
Backport some EE changes from adding shared_runners_minutes_limit to the API
Closes gitlab-ee#2563
See merge request !11936
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/forked_project_link_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/models/forked_project_link_spec.rb b/spec/models/forked_project_link_spec.rb index 454550c9710..6e8d43f988c 100644 --- a/spec/models/forked_project_link_spec.rb +++ b/spec/models/forked_project_link_spec.rb @@ -2,8 +2,8 @@ require 'spec_helper' describe ForkedProjectLink, "add link on fork" do let(:project_from) { create(:project, :repository) } - let(:namespace) { create(:namespace) } - let(:user) { create(:user, namespace: namespace) } + let(:user) { create(:user) } + let(:namespace) { user.namespace } before do create(:project_member, :reporter, user: user, project: project_from) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 1c3541da44f..a83726b48a0 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -13,6 +13,10 @@ describe User, models: true do it { is_expected.to include_module(TokenAuthenticatable) } end + describe 'delegations' do + it { is_expected.to delegate_method(:path).to(:namespace).with_prefix } + end + describe 'associations' do it { is_expected.to have_one(:namespace) } it { is_expected.to have_many(:snippets).dependent(:destroy) } |