summaryrefslogtreecommitdiff
path: root/spec/serializers/serverless/domain_entity_spec.rb
blob: 4d73a0f651a966252f74ef88dacf936b6c99c0f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Serverless::DomainEntity do
  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