spec/email_template_spec.rb in govdelivery-tms-0.8.14 vs spec/email_template_spec.rb in govdelivery-tms-0.9.0

- old
+ new

@@ -77,12 +77,16 @@ 'subject' => 'This is the template 1 subject', 'link_tracking_parameters' => 'test=ok&hello=world', 'macros' => { 'MACRO1' => '1' }, 'open_tracking_enabled' => true, 'click_tracking_enabled' => true, + 'message_type_code' => 'salutations', 'created_at' => 'sometime', - '_links' => { 'self' => '/templates/email/new-template', 'account' => '/accounts/1', 'from_address' => '/from_addresses/1' } + '_links' => { 'self' => '/templates/email/new-template', + 'account' => '/accounts/1', + 'message_type' => '/message_types/abc', + 'from_address' => '/from_addresses/1' } } expect(@template.client).to receive('post').with(@template).and_return(double('response', status: 201, body: response)) @template.post expect(@template.id).to eq('1') expect(@template.uuid).to eq('new-template') @@ -90,11 +94,13 @@ expect(@template.subject).to eq('This is the template 1 subject') expect(@template.link_tracking_parameters).to eq('test=ok&hello=world') expect(@template.macros).to eq('MACRO1' => '1') expect(@template.open_tracking_enabled).to eq(true) expect(@template.click_tracking_enabled).to eq(true) + expect(@template.message_type_code).to eql('salutations') expect(@template.created_at).to eq('sometime') expect(@template.from_address).to be_a(GovDelivery::TMS::FromAddress) + expect(@template.message_type).to be_a(GovDelivery::TMS::MessageType) end end context 'handling errors at the template level' do let(:client) do