mirror of
https://github.com/discourse/discourse.git
synced 2024-12-11 22:34:04 +08:00
493d437e79
* Remove outdated option
04078317ba
* Use the non-globally exposed RSpec syntax
https://github.com/rspec/rspec-core/pull/2803
* Use the non-globally exposed RSpec syntax, cont
https://github.com/rspec/rspec-core/pull/2803
* Comply to strict predicate matchers
See:
- https://github.com/rspec/rspec-expectations/pull/1195
- https://github.com/rspec/rspec-expectations/pull/1196
- https://github.com/rspec/rspec-expectations/pull/1277
30 lines
1.2 KiB
Ruby
30 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe Onebox::Engine::TrelloOnebox do
|
|
context "Boards" do
|
|
it "should onebox with SEF url corrrectly" do
|
|
expect(Onebox.preview('https://trello.com/b/nC8QJJoZ/trello-development-roadmap').to_s).to match('iframe src="https://trello.com/b/nC8QJJoZ.html"')
|
|
end
|
|
|
|
it "should onebox without SEF url corrrectly" do
|
|
expect(Onebox.preview('https://trello.com/b/nC8QJJoZ/').to_s).to match('iframe src="https://trello.com/b/nC8QJJoZ.html"')
|
|
|
|
# Without trailing slash
|
|
expect(Onebox.preview('https://trello.com/b/nC8QJJoZ').to_s).to match('iframe src="https://trello.com/b/nC8QJJoZ.html"')
|
|
end
|
|
end
|
|
|
|
context "Cards" do
|
|
it "should onebox with SEF url corrrectly" do
|
|
expect(Onebox.preview('https://trello.com/c/NIRpzVDM/1211-what-can-you-expect-from-this-board').to_s).to match('iframe src="https://trello.com/c/NIRpzVDM.html"')
|
|
end
|
|
|
|
it "should onebox without SEF url corrrectly" do
|
|
expect(Onebox.preview('https://trello.com/c/NIRpzVDM/').to_s).to match('iframe src="https://trello.com/c/NIRpzVDM.html"')
|
|
|
|
# Without trailing slash
|
|
expect(Onebox.preview('https://trello.com/c/NIRpzVDM').to_s).to match('iframe src="https://trello.com/c/NIRpzVDM.html"')
|
|
end
|
|
end
|
|
end
|