discourse/spec/components/discourse_hub_spec.rb
2014-07-16 12:25:24 -04:00

12 lines
436 B
Ruby

require 'spec_helper'
require_dependency 'discourse_hub'
describe DiscourseHub do
describe '#discourse_version_check' do
it 'should return just return the json that the hub returns' do
hub_response = {'success' => 'OK', 'latest_version' => '0.8.1', 'critical_updates' => false}
RestClient.stubs(:get).returns( hub_response.to_json )
DiscourseHub.discourse_version_check.should == hub_response
end
end
end