2016-11-04 08:23:06 -04:00
|
|
|
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
|
2016-11-17 10:08:05 -05:00
|
|
|
expect(subject).to include(:id, :name, :state, :environment_path)
|
2016-11-04 08:23:06 -04:00
|
|
|
end
|
|
|
|
end
|