Bugzilla – Attachment 51117 Details for
Bug 16423
Fix t/db_dependent/www/batch.t so it matches new layout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16423: (followup) Add more tests
Bug-16423-followup-Add-more-tests.patch (text/plain), 2.25 KB, created by
Tomás Cohen Arazi
on 2016-05-02 20:45:22 UTC
(
hide
)
Description:
Bug 16423: (followup) Add more tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2016-05-02 20:45:22 UTC
Size:
2.25 KB
patch
obsolete
>From 28b13b33fa5dcba57cdf598fe5258a8f05eba809 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 2 May 2016 17:42:29 -0300 >Subject: [PATCH] Bug 16423: (followup) Add more tests > >On fixing this tests, we retrieved the JSON data for the datatable used on >the 'Manage staged records' page. It would be cool to check the data it >carries makes sense. > >To test: >- Run t/db_dependent/www/batch.t >=> SUCCESS: Tests pass >- Sign off :-D >--- > t/db_dependent/www/batch.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/www/batch.t b/t/db_dependent/www/batch.t >index bf04ea1..0390cf7 100644 >--- a/t/db_dependent/www/batch.t >+++ b/t/db_dependent/www/batch.t >@@ -19,7 +19,7 @@ > use Modern::Perl; > > use utf8; >-use Test::More tests => 20; >+use Test::More tests => 24; > use Test::WWW::Mechanize; > use XML::Simple; > use JSON; >@@ -178,6 +178,9 @@ $agent->get_ok( > ); > $jsonresponse = decode_json $agent->content; > like( $jsonresponse->{ aaData }[0]->{ citation }, qr/$bookdescription/, 'found book' ); >+is( $jsonresponse->{ aaData }[0]->{ status }, 'staged', 'record marked as staged' ); >+is( $jsonresponse->{ aaData }[0]->{ overlay_status }, 'no_match', 'record has no matches' ); >+ > my $biblionumber = $jsonresponse->{ aaData }[0]->{ import_record_id }; > # Back to the manage staged records page > $agent->get($staged_records_uri); >@@ -185,6 +188,11 @@ $agent->form_number(6); > $agent->field( 'framework', '' ); > $agent->click_ok( 'mainformsubmit', "imported records into catalog" ); > >+$agent->get("$intranet/cgi-bin/koha/tools/batch_records_ajax.pl?import_batch_id=$import_batch_id"); >+$jsonresponse = decode_json $agent->content; >+is( $jsonresponse->{ aaData }[0]->{ status }, 'imported', 'record marked as imported' ); >+ >+$agent->get($staged_records_uri); > $agent->form_number(5); > $agent->click_ok( 'mainformsubmit', "revert import" ); > $agent->get_ok( >@@ -193,4 +201,8 @@ $agent->get_ok( > $agent->content_contains( 'The record you requested does not exist', > 'bib is gone' ); > >+$agent->get("$intranet/cgi-bin/koha/tools/batch_records_ajax.pl?import_batch_id=$import_batch_id"); >+$jsonresponse = decode_json $agent->content; >+is( $jsonresponse->{ aaData }[0]->{ status }, 'reverted', 'record marked as reverted' ); >+ > 1; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16423
:
51116
|
51117
|
51149
|
51150
|
51151
|
51152
|
51155