diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-06-02 20:32:02 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-06-02 20:32:02 +0200 |
commit | 0383b4822562005e20cdda80bca20a5fc11e9f8f (patch) | |
tree | 9f6bdaea50d256ecf58f9ccfd49198019897a196 /spec/serializers | |
parent | b24651826f249cd1fcbd87d097c42488d0472611 (diff) | |
parent | 11852e16387790c26be7b8d1dd99ed689bf9d45b (diff) | |
download | gitlab-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.rb | 2 | ||||
-rw-r--r-- | spec/serializers/user_entity_spec.rb | 6 |
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 |