spec/mastalk_spec.rb in mastalk-0.3.3 vs spec/mastalk_spec.rb in mastalk-0.3.4
- old
+ new
@@ -141,12 +141,20 @@
expect(subject.to_html).to eq(expected)
end
end
context 'bright video' do
- let(:source) { "(@123@)" }
+ let(:source) { "[[3739688349001]]" }
it 'pre-processes correctly' do
- expect(subject.to_html).to match(/videoId\=123/)
+ expect(subject.to_html).to match(/videoId\=3739688349001/)
+ end
+ end
+
+ context 'when youtube video' do
+ let(:source) { '({oZ0_U108aZw})' }
+
+ it 'includes youtube embed video' do
+ expect(subject.to_html).to include('https://www.youtube.com/embed/oZ0_U108aZw')
end
end
end