diff --git a/app/views/export_mailer/export.html.erb b/app/views/export_mailer/export.html.erb
index 60c195089..f992a7728 100644
--- a/app/views/export_mailer/export.html.erb
+++ b/app/views/export_mailer/export.html.erb
@@ -7,7 +7,7 @@
<%= link_to t(".download_export", :validity => distance_of_time_in_words(@export.created_at, Export.validity.ago)),
- download_catalog_admin_export_path(@export.catalog.slug, I18n.locale, @export.id)
+ download_catalog_admin_export_url(@export.catalog.slug, I18n.locale, @export.id)
%>
@@ -15,6 +15,6 @@
<%= t(".export_logs", :catalog_name => @export.catalog.name) %>
- <%= link_to t(".here"), catalog_admin_exports_path(@export.catalog.slug, I18n.locale) %>.
+ <%= link_to t(".here"), catalog_admin_exports_url(@export.catalog.slug, I18n.locale) %>.
diff --git a/test/mailers/export_mailer_test.rb b/test/mailers/export_mailer_test.rb
index 18ff8a6c1..c67fe51b4 100644
--- a/test/mailers/export_mailer_test.rb
+++ b/test/mailers/export_mailer_test.rb
@@ -1,7 +1,13 @@
require 'test_helper'
class ExportMailerTest < ActionMailer::TestCase
- # test "the truth" do
- # assert true
- # end
+ test "export" do
+ export = exports(:one)
+ mail = ExportMailer.send_message(export)
+
+ assert_equal("Catima - requested export is ready", mail.subject)
+ assert_equal(["no-reply@catima.unil.ch"], mail.from)
+ assert_equal(["one-admin@example.com"], mail.to)
+ assert_match("/one/en/admin/_exports/#{export.id}/download", mail.body.encoded)
+ end
end