discourse/spec/components/discourse_hub_spec.rb

13 lines
442 B
Ruby
Raw Normal View History

2016-04-01 05:33:25 +08:00
require 'rails_helper'
require_dependency 'discourse_hub'
2013-02-06 03:16:51 +08:00
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 )
2015-01-10 00:34:37 +08:00
expect(DiscourseHub.discourse_version_check).to eq(hub_response)
2013-02-06 03:16:51 +08:00
end
end
end