2020-02-27 10:09:24 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 02:09:01 -04:00
|
|
|
RSpec.describe Serverless::DomainEntity do
|
2020-02-27 10:09:24 -05:00
|
|
|
describe '#as_json' do
|
|
|
|
let(:domain) { create(:pages_domain, :instance_serverless) }
|
|
|
|
|
|
|
|
subject { described_class.new(domain).as_json }
|
|
|
|
|
|
|
|
it 'has an id' do
|
|
|
|
expect(subject[:id]).to eq(domain.id)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'has a domain' do
|
|
|
|
expect(subject[:domain]).to eq(domain.domain)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|