discourse/spec/components/oneboxer/whitelist_spec.rb
Sam e4a76812a6 this is a slightly round about way of making our self oneboxes sane
shrunk avatar to 60px, added global whitelisting
2013-05-01 16:38:13 +10:00

18 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