diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 12:07:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 12:07:33 +0000 |
commit | 6b75320f525f841454f1ab162d141d3610f2e77b (patch) | |
tree | 4971c27759e4fbc18b85e71800c3b9c12346317e /spec/serializers | |
parent | 4226aca420920c1844e8eade4798a2dff188a6fc (diff) | |
download | gitlab-ce-6b75320f525f841454f1ab162d141d3610f2e77b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/container_repository_entity_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/serializers/container_repository_entity_spec.rb b/spec/serializers/container_repository_entity_spec.rb index 5848dd64c3b..799a8d5c122 100644 --- a/spec/serializers/container_repository_entity_spec.rb +++ b/spec/serializers/container_repository_entity_spec.rb @@ -25,6 +25,18 @@ describe ContainerRepositoryEntity do expect(subject).to include(:id, :path, :location, :tags_path) end + context 'when project is not preset in the request' do + before do + allow(request).to receive(:respond_to?).and_return(false) + allow(request).to receive(:project).and_return(nil) + end + + it 'uses project from the object' do + expect(request.project).not_to equal(project) + expect(subject).to include(:tags_path) + end + end + context 'when user can manage repositories' do before do project.add_developer(user) |