summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-06-02 20:32:02 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-02 20:32:02 +0200
commit0383b4822562005e20cdda80bca20a5fc11e9f8f (patch)
tree9f6bdaea50d256ecf58f9ccfd49198019897a196 /spec/serializers
parentb24651826f249cd1fcbd87d097c42488d0472611 (diff)
parent11852e16387790c26be7b8d1dd99ed689bf9d45b (diff)
downloadgitlab-ce-0383b4822562005e20cdda80bca20a5fc11e9f8f.tar.gz
Merge remote-tracking branch 'origin/master' into zj-job-view-goes-real-time
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/pipeline_serializer_spec.rb2
-rw-r--r--spec/serializers/user_entity_spec.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/spec/serializers/pipeline_serializer_spec.rb b/spec/serializers/pipeline_serializer_spec.rb
index f2426db6d81..088f24eb180 100644
--- a/spec/serializers/pipeline_serializer_spec.rb
+++ b/spec/serializers/pipeline_serializer_spec.rb
@@ -113,7 +113,7 @@ describe PipelineSerializer do
it "verifies number of queries" do
recorded = ActiveRecord::QueryRecorder.new { subject }
- expect(recorded.count).to be_within(1).of(58)
+ expect(recorded.count).to be_within(1).of(60)
expect(recorded.cached_count).to eq(0)
end
diff --git a/spec/serializers/user_entity_spec.rb b/spec/serializers/user_entity_spec.rb
index c5d11cbcf5e..cd778e49107 100644
--- a/spec/serializers/user_entity_spec.rb
+++ b/spec/serializers/user_entity_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
describe UserEntity do
+ include Gitlab::Routing
+
let(:entity) { described_class.new(user) }
let(:user) { create(:user) }
subject { entity.as_json }
@@ -20,4 +22,8 @@ describe UserEntity do
it 'does not expose 2FA OTPs' do
expect(subject).not_to include(/otp/)
end
+
+ it 'exposes user path' do
+ expect(subject[:path]).to eq user_path(user)
+ end
end