summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:07:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-17 18:07:48 +0000
commite72386771751fb22245bc6604fef236a2ee130cb (patch)
tree7cf54bca933159cb177d3caa2f139f87d6d30391 /spec/serializers
parentc2b98d3dbd47ab92c79c702276fe9130d9a28036 (diff)
downloadgitlab-ce-e72386771751fb22245bc6604fef236a2ee130cb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/blob_entity_spec.rb2
-rw-r--r--spec/serializers/cluster_application_entity_spec.rb1
-rw-r--r--spec/serializers/cluster_entity_spec.rb1
-rw-r--r--spec/serializers/environment_entity_spec.rb1
-rw-r--r--spec/serializers/group_child_entity_spec.rb1
-rw-r--r--spec/serializers/group_child_serializer_spec.rb1
-rw-r--r--spec/serializers/merge_request_poll_widget_entity_spec.rb2
-rw-r--r--spec/serializers/note_entity_spec.rb1
-rw-r--r--spec/serializers/project_note_entity_spec.rb1
-rw-r--r--spec/serializers/user_entity_spec.rb1
10 files changed, 10 insertions, 2 deletions
diff --git a/spec/serializers/blob_entity_spec.rb b/spec/serializers/blob_entity_spec.rb
index 7e3a0a87bd5..3cd967ed44c 100644
--- a/spec/serializers/blob_entity_spec.rb
+++ b/spec/serializers/blob_entity_spec.rb
@@ -23,7 +23,7 @@ describe BlobEntity do
mode: "100644",
readable_text: true,
icon: "file-text-o",
- url: "/#{project.full_path}/blob/master/bar/branch-test.txt"
+ url: "/#{project.full_path}/-/blob/master/bar/branch-test.txt"
})
end
end
diff --git a/spec/serializers/cluster_application_entity_spec.rb b/spec/serializers/cluster_application_entity_spec.rb
index cb9325986d7..c700c150461 100644
--- a/spec/serializers/cluster_application_entity_spec.rb
+++ b/spec/serializers/cluster_application_entity_spec.rb
@@ -5,6 +5,7 @@ require 'spec_helper'
describe ClusterApplicationEntity do
describe '#as_json' do
let(:application) { build(:clusters_applications_helm, version: '0.1.1') }
+
subject { described_class.new(application).as_json }
it 'has name' do
diff --git a/spec/serializers/cluster_entity_spec.rb b/spec/serializers/cluster_entity_spec.rb
index 22b9166f922..e3826a7221d 100644
--- a/spec/serializers/cluster_entity_spec.rb
+++ b/spec/serializers/cluster_entity_spec.rb
@@ -39,6 +39,7 @@ describe ClusterEntity do
context 'when no application has been installed' do
let(:cluster) { create(:cluster) }
+
subject { described_class.new(cluster).as_json[:applications]}
it 'contains helm as not_installable' do
diff --git a/spec/serializers/environment_entity_spec.rb b/spec/serializers/environment_entity_spec.rb
index e4d1d7f9049..f392ecea959 100644
--- a/spec/serializers/environment_entity_spec.rb
+++ b/spec/serializers/environment_entity_spec.rb
@@ -9,6 +9,7 @@ describe EnvironmentEntity do
end
let(:environment) { create(:environment) }
+
subject { entity.as_json }
it 'exposes latest deployment' do
diff --git a/spec/serializers/group_child_entity_spec.rb b/spec/serializers/group_child_entity_spec.rb
index 198a55d5433..cae263e7fd5 100644
--- a/spec/serializers/group_child_entity_spec.rb
+++ b/spec/serializers/group_child_entity_spec.rb
@@ -9,6 +9,7 @@ describe GroupChildEntity do
let(:user) { create(:user) }
let(:request) { double('request') }
let(:entity) { described_class.new(object, request: request) }
+
subject(:json) { entity.as_json }
before do
diff --git a/spec/serializers/group_child_serializer_spec.rb b/spec/serializers/group_child_serializer_spec.rb
index 128e06cd172..92f083ed23e 100644
--- a/spec/serializers/group_child_serializer_spec.rb
+++ b/spec/serializers/group_child_serializer_spec.rb
@@ -5,6 +5,7 @@ require 'spec_helper'
describe GroupChildSerializer do
let(:request) { double('request') }
let(:user) { create(:user) }
+
subject(:serializer) { described_class.new(current_user: user) }
describe '#represent' do
diff --git a/spec/serializers/merge_request_poll_widget_entity_spec.rb b/spec/serializers/merge_request_poll_widget_entity_spec.rb
index ea9052b4046..0593dd527cc 100644
--- a/spec/serializers/merge_request_poll_widget_entity_spec.rb
+++ b/spec/serializers/merge_request_poll_widget_entity_spec.rb
@@ -60,7 +60,7 @@ describe MergeRequestPollWidgetEntity do
project.add_developer(user)
expect(subject[:new_blob_path])
- .to eq("/#{resource.project.full_path}/new/#{resource.source_branch}")
+ .to eq("/#{resource.project.full_path}/-/new/#{resource.source_branch}")
end
end
diff --git a/spec/serializers/note_entity_spec.rb b/spec/serializers/note_entity_spec.rb
index cec07cda063..f37fffb5048 100644
--- a/spec/serializers/note_entity_spec.rb
+++ b/spec/serializers/note_entity_spec.rb
@@ -10,6 +10,7 @@ describe NoteEntity do
let(:entity) { described_class.new(note, request: request) }
let(:note) { create(:note) }
let(:user) { create(:user) }
+
subject { entity.as_json }
it_behaves_like 'note entity'
diff --git a/spec/serializers/project_note_entity_spec.rb b/spec/serializers/project_note_entity_spec.rb
index 7c76f230781..469bf2b86de 100644
--- a/spec/serializers/project_note_entity_spec.rb
+++ b/spec/serializers/project_note_entity_spec.rb
@@ -10,6 +10,7 @@ describe ProjectNoteEntity do
let(:entity) { described_class.new(note, request: request) }
let(:note) { create(:note) }
let(:user) { create(:user) }
+
subject { entity.as_json }
it_behaves_like 'note entity'
diff --git a/spec/serializers/user_entity_spec.rb b/spec/serializers/user_entity_spec.rb
index edb49757b38..71107daf6ac 100644
--- a/spec/serializers/user_entity_spec.rb
+++ b/spec/serializers/user_entity_spec.rb
@@ -7,6 +7,7 @@ describe UserEntity do
let(:entity) { described_class.new(user) }
let(:user) { create(:user) }
+
subject { entity.as_json }
it 'exposes user name and login' do