Improved tests.
This commit is contained in:
parent
fedae1587a
commit
d7f3f4a7ff
2 changed files with 11 additions and 6 deletions
|
@ -2,6 +2,9 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class NotificationFactoryTest < ActiveSupport::TestCase
|
class NotificationFactoryTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
|
Translation.load('de-de')
|
||||||
|
|
||||||
test 'notifications send' do
|
test 'notifications send' do
|
||||||
result = NotificationFactory.send(
|
result = NotificationFactory.send(
|
||||||
recipient: User.find(2),
|
recipient: User.find(2),
|
||||||
|
|
|
@ -2,24 +2,26 @@
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class TranslationTest < ActiveSupport::TestCase
|
class TranslationTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
|
Translation.load('de-de')
|
||||||
|
|
||||||
test 'translation' do
|
test 'translation' do
|
||||||
tests = [
|
tests = [
|
||||||
|
|
||||||
# test 1
|
|
||||||
{
|
{
|
||||||
locale: 'en',
|
locale: 'en',
|
||||||
string: 'New',
|
string: 'New',
|
||||||
result: 'New',
|
result: 'New',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
# test 2
|
locale: 'en-us',
|
||||||
|
string: 'New',
|
||||||
|
result: 'New',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
locale: 'de-de',
|
locale: 'de-de',
|
||||||
string: 'New',
|
string: 'New',
|
||||||
result: 'Neu',
|
result: 'Neu',
|
||||||
},
|
},
|
||||||
|
|
||||||
# test 3
|
|
||||||
{
|
{
|
||||||
locale: 'de-de',
|
locale: 'de-de',
|
||||||
string: 'not translated - lalala',
|
string: 'not translated - lalala',
|
||||||
|
|
Loading…
Reference in a new issue