mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-03 12:27:35 -05:00
16 lines
392 B
Ruby
16 lines
392 B
Ruby
|
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
|