This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/controllers/onebox_controller_spec.rb
2013-02-05 14:16:51 -05:00

15 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