summaryrefslogtreecommitdiff
path: root/spec/serializers/environment_entity_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/serializers/environment_entity_spec.rb')
-rw-r--r--spec/serializers/environment_entity_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/serializers/environment_entity_spec.rb b/spec/serializers/environment_entity_spec.rb
new file mode 100644
index 00000000000..4ca8c299147
--- /dev/null
+++ b/spec/serializers/environment_entity_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+
+describe EnvironmentEntity do
+ let(:entity) do
+ described_class.new(environment, request: double)
+ end
+
+ let(:environment) { create(:environment) }
+ subject { entity.as_json }
+
+ it 'exposes latest deployment' do
+ expect(subject).to include(:last_deployment)
+ end
+
+ it 'exposes core elements of environment' do
+ expect(subject).to include(:id, :name, :state, :environment_url)
+ end
+end