diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-04 15:23:06 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-11-04 15:23:06 +0300 |
commit | e49fb264e6cb5eff44330d69d34b5f74ef262659 (patch) | |
tree | 2b3b22c0b5338cb2b81ff97d25e3770e9a3eb59d /spec/serializers/deployment_entity_spec.rb | |
parent | 3968b07d7ea1fd2ca07e427a487ea94ca0c6081d (diff) |
Add tests for deployment and environment entitites
Diffstat (limited to 'spec/serializers/deployment_entity_spec.rb')
-rw-r--r-- | spec/serializers/deployment_entity_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb new file mode 100644 index 00000000000..51b6de91571 --- /dev/null +++ b/spec/serializers/deployment_entity_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe DeploymentEntity do + let(:entity) do + described_class.new(deployment, request: double) + 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_url]).not_to be_empty + end +end |