2013-02-06 03:16:51 +08:00
|
|
|
require 'spec_helper'
|
2013-02-15 01:57:26 +08:00
|
|
|
require_dependency 'discourse_hub'
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2013-02-15 01:57:26 +08:00
|
|
|
describe DiscourseHub do
|
2013-02-20 04:16:50 +08:00
|
|
|
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
|
2013-02-06 03:16:51 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|