diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-02 19:56:49 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-02 19:56:49 +0300 |
commit | d048d9268cd12fd78a1d07fb46b5c94a2cc16961 (patch) | |
tree | ae1404def0d7e9a29e96492b6fb89ab04fa14394 /spec/serializers | |
parent | 9fce7c8e02b5486e4931432cad8b07830fa65278 (diff) | |
parent | 7f22256a63b2c4e6fb1a85beb2ad5420b085247e (diff) |
Merge branch 'metrics-deployment-history' into 'master'
Metrics deployment history
Closes #26914
See merge request !10649
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/deployment_entity_spec.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb index 95eca5463eb..69355bcde42 100644 --- a/spec/serializers/deployment_entity_spec.rb +++ b/spec/serializers/deployment_entity_spec.rb @@ -3,25 +3,23 @@ require 'spec_helper' describe DeploymentEntity do let(:user) { create(:user) } let(:request) { double('request') } + let(:deployment) { create(:deployment) } + let(:entity) { described_class.new(deployment, request: request) } + subject { entity.as_json } before do allow(request).to receive(:user).and_return(user) end - let(:entity) do - described_class.new(deployment, request: request) - end - - let(:deployment) { create(:deployment) } - - subject { entity.as_json } - it 'exposes internal deployment id' do expect(subject).to include(:iid) end it 'exposes nested information about branch' do expect(subject[:ref][:name]).to eq 'master' - expect(subject[:ref][:ref_path]).not_to be_empty + end + + it 'exposes creation date' do + expect(subject).to include(:created_at) end end |