Skip to content

Commit

Permalink
Adds additional test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdnbrk committed Aug 24, 2019
1 parent b8ac098 commit ac43c47
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/GtinValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Mvdnbrk\Gtin\Tests;

use Illuminate\Support\Facades\App;

class GtinValidationTest extends TestCase
{
/**
Expand Down Expand Up @@ -188,6 +190,22 @@ public function it_returns_the_correct_error_message()
);
}

/** @test */
public function it_returns_the_correct_translated_error_message()
{
App::setLocale('nl');

$validation = $this->validator->make(
['field' => 'invalid-gtin'],
['field' => 'gtin']
);

$this->assertEquals(
'Het veld field moet een geldig Global Trade Item Number (GTIN) zijn.',
$validation->errors()->first('field')
);
}

/** @test */
public function it_has_a_helper_function()
{
Expand Down

0 comments on commit ac43c47

Please sign in to comment.