spec/mastalk/document_spec.rb in mastalk-0.9.0 vs spec/mastalk/document_spec.rb in mastalk-0.9.1
- old
+ new
@@ -281,6 +281,33 @@
it 'outputs a collapsible header' do
expect(subject.to_html).to eq(expected)
end
end
+
+ context 'Fincap Feedback UI Component' do
+ let(:email_address) { 'test@email.com' }
+ let(:source) { "$fincap_feedback#{email_address}$" }
+
+ let(:expected) do
+ %(<a href="mailto:#{email_address}" class="feedback-box__text">)
+ end
+
+ it 'outputs the correct mailto link' do
+ expect(subject.to_html).to include(expected)
+ end
+ end
+
+ context 'Fincap Primary Button' do
+ let(:link_text) { 'test text' }
+ let(:link_url) { 'https://www.moneyadviceservice.org.uk' }
+ let(:source) { "$~fincap_primary_button[#{link_text}](#{link_url})~$" }
+
+ let(:expected) do
+ %(<a href="#{link_url}">#{link_text}</a>)
+ end
+
+ it 'outputs the correct link url and text' do
+ expect(subject.to_html).to include(expected)
+ end
+ end
end