pull/15930/head
Jorge Tarrero 4 years ago
parent 8c6de9e784
commit aa52aff349

@ -38,7 +38,7 @@ class Carto::User < ActiveRecord::Base
belongs_to :rate_limit
has_one :owned_organization, class_name: Carto::Organization, inverse_of: :owner, foreign_key: :owner_id
has_one :static_notifications, class_name: Carto::UserNotification, inverse_of: :user
has_many :email_notifications, class_name: Carto::UserEmailNotification, inverse_of: :user, dependent: :destroy
has_many :email_notifications, class_name: 'Carto::UserEmailNotification', inverse_of: :user, dependent: :destroy
has_many :self_feature_flags_user, dependent: :destroy, foreign_key: :user_id, inverse_of: :user, class_name: Carto::FeatureFlagsUser
has_many :self_feature_flags, through: :self_feature_flags_user, source: :feature_flag

@ -102,7 +102,7 @@ describe Carto::User do
end
end
describe "#is_email_notification_enabled" do
describe '#is_email_notification_enabled' do
before(:all) do
@carto_user = FactoryGirl.create(:carto_user)
end

@ -44,7 +44,8 @@ describe Carto::Api::EmailNotificationsController do
end
it 'successfully updates notifications' do
put_json(api_v3_email_notifications_update_url(auth_params), { notifications: { do_subscriptions: false } }) do |response|
params = { notifications: { do_subscriptions: false } }
put_json(api_v3_email_notifications_update_url(auth_params), params) do |response|
response.status.should eq 204
end
end

Loading…
Cancel
Save