28 lines
1.1 KiB
Ruby
28 lines
1.1 KiB
Ruby
require 'rails_helper'
|
|
|
|
describe ChatwootHub do
|
|
it 'does not expose remote sync, registration, or event APIs' do
|
|
expect(described_class).not_to respond_to(:sync_with_hub)
|
|
expect(described_class).not_to respond_to(:register_instance)
|
|
expect(described_class).not_to respond_to(:emit_event)
|
|
end
|
|
|
|
it 'retains push and instance compatibility APIs for the push-relay task' do
|
|
expect(described_class).to respond_to(:push_notification_url, :send_push, :send_push_with_response, :instance_config)
|
|
expect(described_class.push_notification_url).to eq('https://hub.2.chatwoot.com/send_push')
|
|
end
|
|
|
|
describe '.base_url' do
|
|
it 'uses the static hub url' do
|
|
expect(described_class::DEFAULT_BASE_URL).to eq('https://hub.2.chatwoot.com')
|
|
expect(described_class.base_url).to eq('https://hub.2.chatwoot.com')
|
|
end
|
|
end
|
|
|
|
it 'generates installation identifier' do
|
|
installation_identifier = described_class.installation_identifier
|
|
expect(installation_identifier).not_to be_nil
|
|
expect(described_class.installation_identifier).to eq installation_identifier
|
|
end
|
|
end
|