View | Details | Raw Unified | Return to bug 16053
Collapse All | Expand All

(-)a/t/db_dependent/Koha/Acquisition/Currencies.t (-2 / +5 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Test::More tests => 6;
21
use Test::More tests => 7;
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::Acquisition::Currency;
23
use Koha::Acquisition::Currency;
24
use Koha::Acquisition::Currencies;
24
use Koha::Acquisition::Currencies;
Lines 56-61 is( Koha::Acquisition::Currencies->search->count, $nb_of_currencies + 2, 'The 2 Link Here
56
my $retrieved_currency_2 = Koha::Acquisition::Currencies->find( $new_currency_2->currency );
56
my $retrieved_currency_2 = Koha::Acquisition::Currencies->find( $new_currency_2->currency );
57
is( $retrieved_currency_2->active, 1, 'Active should have been set to 1' );
57
is( $retrieved_currency_2->active, 1, 'Active should have been set to 1' );
58
58
59
$retrieved_currency_2->store;
60
$retrieved_currency_2 = Koha::Acquisition::Currencies->find( $new_currency_2->currency );
61
is( $retrieved_currency_2->active, 1, 'Editing the existing active currency should not remove its active flag' );
62
59
my $active_currency = Koha::Acquisition::Currencies->get_active;
63
my $active_currency = Koha::Acquisition::Currencies->get_active;
60
is ( $active_currency->currency, $retrieved_currency_2->currency, 'The active currency should be the last one marked as active' );
64
is ( $active_currency->currency, $retrieved_currency_2->currency, 'The active currency should be the last one marked as active' );
61
65
62
- 

Return to bug 16053