summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-05-09 08:54:57 +0200
committerAzul <azul@riseup.net>2016-05-09 08:54:57 +0200
commit90e2145e33913ff59b99b81a660cb730e3c7efd8 (patch)
treeb05cb68d6f271f73442eef2fdc4fea92f15d3d71 /test/support
parent0ab4b26752c7949840f9168a7e8dc94226debd51 (diff)
test: make identity test locale independent
It somehow managed to fail for a certain test order. Seems rather rare though - have not been able to reproduce it in 5 runs. Failed with --seed 60219.
Diffstat (limited to 'test/support')
-rw-r--r--test/support/record_assertions.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/support/record_assertions.rb b/test/support/record_assertions.rb
new file mode 100644
index 0000000..30b947f
--- /dev/null
+++ b/test/support/record_assertions.rb
@@ -0,0 +1,10 @@
+module RecordAssertions
+
+ def assert_error(record, options)
+ options.each do |k, v|
+ errors = record.errors[k]
+ assert_equal I18n.t("errors.messages.#{v}"), errors.first
+ end
+ end
+
+end