* PushNotificationTarget model + /admin/push_notifications (index) * Admin panel CRUD + request tests * Migrate Redis backed Rpush model responsibilities into PushNotificationTarget * Fix failing specs * Fix conflicts + clean up test by using constant reference * Removed unused policy * policy + services + misc feedback * PushNotificationTarget refactored to AppIntegration * Review feedback * Some small cleanup * Refactor AppIntegration -> ConsumerApp * Fixing specs * Trigger Travis * More naming refactor changes * Refactor services into queries * Revert to where(...).first, fix typo and tests * Apply suggestions from code review Co-authored-by: rhymes <rhymes@hey.com> * PR review feedback - create_or_find_by, validations, renaming + more tests * Fix aria-label text * Remove unnecessary individual index - composite index will do Co-authored-by: rhymes <rhymes@hey.com>
20 lines
636 B
Ruby
20 lines
636 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: Device::IOS)
|
|
end
|
|
|
|
describe "Redis-backed rpush app" do
|
|
it "is recreated after updating a ConsumerApp" do
|
|
# 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
|