mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
gist oneboxer issues
This commit is contained in:
parent
2609350457
commit
2b276bc2c8
2 changed files with 17 additions and 7 deletions
16
spec/components/oneboxer/gist_onebox_spec.rb
Normal file
16
spec/components/oneboxer/gist_onebox_spec.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
require 'spec_helper'
|
||||
require 'oneboxer'
|
||||
require 'oneboxer/gist_onebox'
|
||||
|
||||
describe Oneboxer::GistOnebox do
|
||||
it "does not trip on user names" do
|
||||
o = Oneboxer::GistOnebox.new('https://gist.github.com/aaa/4599619')
|
||||
o.translate_url.should == 'https://api.github.com/gists/4599619'
|
||||
end
|
||||
|
||||
it "works for old school urls too" do
|
||||
o = Oneboxer::GistOnebox.new('https://gist.github.com/4599619')
|
||||
o.translate_url.should == 'https://api.github.com/gists/4599619'
|
||||
end
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue