mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Initial release of Discourse
This commit is contained in:
15
spec/controllers/onebox_controller_spec.rb
Normal file
15
spec/controllers/onebox_controller_spec.rb
Normal file
@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe OneboxController do
|
||||
|
||||
it 'asks the oneboxer for the preview' do
|
||||
Oneboxer.expects(:preview).with('http://google.com')
|
||||
xhr :get, :show, url: 'http://google.com'
|
||||
end
|
||||
|
||||
it 'invalidates the cache if refresh is passed' do
|
||||
Oneboxer.expects(:invalidate).with('http://google.com')
|
||||
xhr :get, :show, url: 'http://google.com', refresh: true
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user