Make Admin Notifications translatable

This commit is contained in:
Marko Lovic
2018-08-01 14:38:07 +02:00
committed by Javi Martín
parent 5ff85d33d6
commit f6749049c9
8 changed files with 57 additions and 7 deletions

View File

@@ -8,6 +8,11 @@ feature "Admin Notifications" do
create(:budget)
end
it_behaves_like "translatable",
"admin_notification",
"edit_admin_admin_notification_path",
%w[title body]
context "Show" do
scenario "Valid Admin Notification" do
notification = create(:admin_notification, title: 'Notification title',
@@ -180,7 +185,7 @@ feature "Admin Notifications" do
notification = create(:admin_notification)
visit edit_admin_admin_notification_path(notification)
fill_in :admin_notification_title, with: ''
fill_in :admin_notification_title_en, with: ''
click_button "Update notification"
expect(page).to have_content error_message