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

(-)a/t/db_dependent/Koha/Items.t (-3 / +4 lines)
Lines 118-130 subtest 'store' => sub { Link Here
118
            Time::Fake->offset( $yesterday->epoch );
118
            Time::Fake->offset( $yesterday->epoch );
119
            $item->$field(1)->store;
119
            $item->$field(1)->store;
120
            $item->get_from_storage;
120
            $item->get_from_storage;
121
            is($item->$field_on, DateTime::Format::MySQL->format_datetime($yesterday), $field_on . " was set upon first truthy setting");
121
            is( t::lib::Dates::compare( $item->$field_on, $yesterday ),
122
                0, $field_on . " was set upon first truthy setting" );
122
123
123
            # Update the field to a new 'true' value
124
            # Update the field to a new 'true' value
124
            Time::Fake->offset( $today->epoch );
125
            Time::Fake->offset( $today->epoch );
125
            $item->$field(2)->store;
126
            $item->$field(2)->store;
126
            $item->get_from_storage;
127
            $item->get_from_storage;
127
            is($item->$field_on, DateTime::Format::MySQL->format_datetime($yesterday), $field_on . " was not updated upon second truthy setting");
128
            is( t::lib::Dates::compare( $item->$field_on, $yesterday ),
129
                0, $field_on . " was not updated upon second truthy setting" );
128
130
129
            # Update the field to a new 'false' value
131
            # Update the field to a new 'false' value
130
            $item->$field(0)->store;
132
            $item->$field(0)->store;
131
- 

Return to bug 18501