* Add fakeredis gem * Mock Pusher::PushNotifications in specs * Remove Redis from Travis * Add Android tests to ConsumerApp specs * Use mock for push notification tests and refactor ConsumerApp and Device code * Fix remaining broken specs * Use symbols * Cleanup rpush helpers * Pusher::PushNotifications is no more * Use human friendly platform in Admin::ConsumerApps index page
22 lines
648 B
Ruby
22 lines
648 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe ConsumerApps::RpushAppQuery, type: :query do
|
|
let(:consumer_app) do
|
|
ConsumerApps::FindOrCreateByQuery.call(app_bundle: ConsumerApp::FOREM_BUNDLE, platform: :ios)
|
|
end
|
|
|
|
describe "Rpush app" do
|
|
it "is recreated after updating a ConsumerApp" do
|
|
mock_rpush(consumer_app)
|
|
|
|
# Fetch rpush app associated to the target
|
|
rpush_app = described_class.call(
|
|
app_bundle: consumer_app.app_bundle,
|
|
platform: consumer_app.platform,
|
|
)
|
|
|
|
expect(rpush_app).to be_instance_of(Rpush::Apns2::App)
|
|
expect(rpush_app.name).to eq(consumer_app.app_bundle)
|
|
end
|
|
end
|
|
end
|