mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 03:17:53 -05:00
19 lines
671 B
Ruby
19 lines
671 B
Ruby
|
require 'spec_helper'
|
||
|
require 'oneboxer'
|
||
|
require 'oneboxer/whitelist'
|
||
|
|
||
|
describe Oneboxer::Whitelist do
|
||
|
it "matches an arbitrary Discourse post link" do
|
||
|
Oneboxer::Whitelist.entry_for_url('http://meta.discourse.org/t/scrolling-up-not-loading-in-firefox/3340/6?123').should_not be_nil
|
||
|
end
|
||
|
|
||
|
it "matches an arbitrary Discourse topic link" do
|
||
|
Oneboxer::Whitelist.entry_for_url('http://meta.discourse.org/t/scrolling-up-not-loading-in-firefox/3340?123').should_not be_nil
|
||
|
end
|
||
|
|
||
|
it "Does not match on slight variation" do
|
||
|
Oneboxer::Whitelist.entry_for_url('http://meta.discourse.org/t/scrolling-up-not-loading-in-firefox/3340a?123').should be_nil
|
||
|
end
|
||
|
|
||
|
end
|