2015-10-11 05:41:23 -04:00
|
|
|
require 'rails_helper'
|
2013-02-14 12:57:26 -05:00
|
|
|
require_dependency 'discourse_hub'
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2013-02-14 12:57:26 -05:00
|
|
|
describe DiscourseHub do
|
2013-02-19 15:16:50 -05: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 )
|
2015-01-09 11:34:37 -05:00
|
|
|
expect(DiscourseHub.discourse_version_check).to eq(hub_response)
|
2013-02-05 14:16:51 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|