Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

User notification: "Product information" #1567

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/models/user_notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class UserNotification
new_applicant_job_info
applicant_will_perform_job_info
update_data_reminder
product_information
).freeze

COMPANY = %w(
Expand All @@ -25,6 +26,7 @@ class UserNotification
new_job_comment
job_match
failed_to_activate_invoice
product_information
).freeze

# Don't change the order or remove any items in the array,
Expand All @@ -47,6 +49,7 @@ class UserNotification
applicant_will_perform_job_info
failed_to_activate_invoice
update_data_reminder
product_information
).freeze

def self.names(user_role: nil)
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ en:
applicant_will_perform_job_info: Job confirmation info
failed_to_activate_invoice: Failed to activate invoice
update_data_reminder: Update application data reminder
product_information: Product information
user_document:
categories:
cv: CV
Expand Down
1 change: 1 addition & 0 deletions config/locales/sv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ sv:
applicant_will_perform_job_info: Information om jobbkonfirmering
failed_to_activate_invoice: Aktivering av fakturan misslyckades
update_data_reminder: Påminelse på uppdatering av ansökingsdata
product_information: Produktinformation
user_document:
categories:
cv: CV
Expand Down
3 changes: 3 additions & 0 deletions spec/models/user_notification_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
applicant_will_perform_job_info
failed_to_activate_invoice
update_data_reminder
product_information
).freeze
end

Expand All @@ -37,6 +38,7 @@
new_applicant_job_info
applicant_will_perform_job_info
update_data_reminder
product_information
).freeze
end

Expand All @@ -52,6 +54,7 @@
new_job_comment
job_match
failed_to_activate_invoice
product_information
).freeze
end

Expand Down
3 changes: 2 additions & 1 deletion spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@
applicant_will_perform_job_info
failed_to_activate_invoice
update_data_reminder
product_information
)
expect(UserNotification.names).to eq(expected)
end
Expand All @@ -429,7 +430,7 @@
# these notifications are sent in other notifiers
ignore = %w(
applicant_rejected job_match new_applicant_job_info
applicant_will_perform_job_info update_data_reminder
applicant_will_perform_job_info update_data_reminder product_information
)
(UserNotification.names - ignore).each do |notification|
expect { "#{notification.camelize}Notifier".constantize }.to_not raise_error
Expand Down