@@ -23,7 +23,7 @@ RSpec.describe '/api/v1/widget/contacts', type: :request do
|
||||
|
||||
before do
|
||||
allow(ContactIdentifyAction).to receive(:new).and_return(identify_action)
|
||||
allow(identify_action).to receive(:perform)
|
||||
allow(identify_action).to receive(:perform).and_return(contact)
|
||||
end
|
||||
|
||||
it 'calls contact identify' do
|
||||
@@ -47,7 +47,7 @@ RSpec.describe '/api/v1/widget/contacts', type: :request do
|
||||
|
||||
before do
|
||||
allow(ContactIdentifyAction).to receive(:new).and_return(identify_action)
|
||||
allow(identify_action).to receive(:perform)
|
||||
allow(identify_action).to receive(:perform).and_return(contact)
|
||||
end
|
||||
|
||||
it 'returns success when correct identifier hash is provided' do
|
||||
|
||||
@@ -8,4 +8,12 @@ describe MessageFormatHelper, type: :helper do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#render_message_content' do
|
||||
context 'when render_message_content called' do
|
||||
it 'render text correctly' do
|
||||
expect(helper.render_message_content('Hi *there*, I am mostly text!')).to eq "<p>Hi <em>there</em>, I am mostly text!</p>\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user