Bug 19042: Add mock IndependentBranches=0 for the other test

These tests do not cover correctly getletter, but it is not the goal of
this patch. Superlibrarian behaviour must be tested as well.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2017-08-10 15:02:23 -03:00
parent d01ce104a7
commit e3dafbfccd
1 changed files with 1 additions and 0 deletions

View File

@ -184,6 +184,7 @@ is( $letters->[0]->{name}, 'my name', 'GetLetters gets the name correctly' );
# getletter
subtest 'getletter' => sub {
plan tests => 16;
t::lib::Mocks::mock_preference('IndependentBranches', 0);
my $letter = C4::Letters::getletter('my module', 'my code', $library->{branchcode}, 'email');
is( $letter->{branchcode}, $library->{branchcode}, 'GetLetters gets the branch code correctly' );
is( $letter->{module}, 'my module', 'GetLetters gets the module correctly' );