diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-04-20 13:21:24 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-04-20 13:21:24 +0300 |
commit | e8f2daae8e5eaa6d5ff6a58f95b89d267141a475 (patch) | |
tree | f8691b61e52a70ecbdef7fd4716060fcf0b7cad8 /spec/serializers/deployment_entity_spec.rb | |
parent | 446994610546bcb43d6ace34c1c28357de306b19 (diff) |
Cleanup duplicates in deploymentEntityDetailed and add small spec tests
Diffstat (limited to 'spec/serializers/deployment_entity_spec.rb')
-rw-r--r-- | spec/serializers/deployment_entity_spec.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb index 815837c13b0..69355bcde42 100644 --- a/spec/serializers/deployment_entity_spec.rb +++ b/spec/serializers/deployment_entity_spec.rb @@ -1,28 +1,22 @@ require 'spec_helper' -describe DeploymentEntityDetailed do +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 |