[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Kyle M Hall  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #26 from Kyle M Hall  ---
Pushed to master for 16.11, thanks Lari, Jonathan!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #57585|0   |1
is obsolete||

--- Comment #25 from Tomás Cohen Arazi  ---
Created attachment 57603
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57603=edit
Bug 17431: Remove use of C4::Items and C4::Biblio

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #57284|0   |1
is obsolete||

--- Comment #24 from Tomás Cohen Arazi  ---
Created attachment 57602
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57602=edit
Bug 17431: Create the object we need instead of assuming something exists

Signed-off-by: Jonathan Druart 

Signed-off-by: Josef Moravec 
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #57283|0   |1
is obsolete||

--- Comment #23 from Tomás Cohen Arazi  ---
Created attachment 57601
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57601=edit
Bug 17431: (follow-up) Fix issuingrules

Issuingrules could had prevented holds.t from passing with error
tooManyReserves.
This patch sets issuingrules at the beginning of the test to make sure reserves
are allowed.

To test:
1. Apply patch & Run t/db_dependent/api/v1/holds.t
2. Observe test pass

Signed-off-by: Jonathan Druart 

Signed-off-by: Josef Moravec 
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #57282|0   |1
is obsolete||

--- Comment #22 from Tomás Cohen Arazi  ---
Created attachment 57600
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57600=edit
Bug 17431: Fix failing test t/db_dependent/api/v1/holds.t

This patch fixed failing test for t/db_dependent/api/v1/holds.t which was
broken
after Bug 14695.

$ perl t/db_dependent/api/v1/holds.t
...
not ok 42 - similar match for JSON Pointer "/error"
#   Failed test 'similar match for JSON Pointer "/error"'
#   at t/db_dependent/api/v1/holds.t line 291.
#   'Reserve cannot be placed. Reason: itemAlreadyOnHold'
# doesn't match '(?^u:tooManyReserves)'
# Looks like you failed 1 test of 42.
not ok 4 - Test endpoints with permission

To test:
1. Run t/db_dependent/api/v1/holds.t and observe it fail.
2. Apply patch.
3. Run the test again and observe it pass.

Signed-off-by: Marc 

Signed-off-by: Jonathan Druart 

Signed-off-by: Josef Moravec 
Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #57285|0   |1
is obsolete||
  Attachment #57584|0   |1
is obsolete||

--- Comment #21 from Jonathan Druart  
---
Created attachment 57585
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57585=edit
Bug 17431: Remove use of C4::Items and C4::Biblio

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #20 from Jonathan Druart  
---
This last patch removes the 2 uses of C4::Items and C4::Biblio, please move
forward!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #19 from Jonathan Druart  
---
Created attachment 57584
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57584=edit
Bug 17431: Remove use of C4::Items and C4::Biblio

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com

--- Comment #18 from Martin Renvoize  ---
I'm generally not a big fan of bare 'use' statements for this exact reason. 
It's generally good practice to state which routines your wanting to import..
an order change like this feels like a sub is getting redefined silently and so
it's likely stuff will just start randomly failing again further down the line.

Could we work out where the actual issue lies and either specify the imports so
we're clear about exactly which routine from where we're testing or rename the
routine to be unique across the codebase to remove ambiguity?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #17 from Jonathan Druart  
---
(In reply to Lari Taskula from comment #12)
> I'm not completely sure why changing the order of "use" in the test fixes
> some issues like being unable to call GetItem in C4::Reserves. That seemed
> to be the issue for returning 500 in POST /api/v1/holds. I came across with
> similar issue in Reserves.t. Does the fix make sense and can somebody
> explain what's going on?

I really would like to understand what's happening here, there is something
hidden we need to catch.

Just a thought:

diff --git a/Koha/REST/V1/Hold.pm b/Koha/REST/V1/Hold.pm
index 7f0b1ff..ae1cd4d 100644
--- a/Koha/REST/V1/Hold.pm
+++ b/Koha/REST/V1/Hold.pm
@@ -77,6 +77,7 @@ sub add {

 my $biblio = C4::Biblio::GetBiblio($biblionumber);

+warn $can_reserve;
 my $can_reserve =
   $itemnumber
   ? CanItemBeReserved( $borrowernumber, $itemnumber )

Make the tests fail again.
I also see the following warning (several):
  item-level_itypes set but no itemtype set for item (1064) at
/home/vagrant/kohaclone/Koha/Schema/Result/Item.pm line 698.
when the tests pass, but not when they fail.

Could someone else have a look and try to understand what's happened here?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #16 from Josef Moravec  ---
Created attachment 57285
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57285=edit
[SIGNED-OFF] Bug 17431: Fix another fail in t/db_dependent/api/v1/holds.t

perl t/db_dependent/api/v1/holds.t fails with 500

ok 2 - Test endpoints without permission
# Subtest: Test endpoints without permission, but accessing own object
1..15
ok 1 - POST /api/v1/holds
not ok 2 - 201 Created
#   Failed test '201 Created'
#   at t/db_dependent/api/v1/holds.t line 189.
#  got: '500'
# expected: '201'
not ok 3 - has value for JSON Pointer "/reserve_id"
#   Failed test 'has value for JSON Pointer "/reserve_id"'
#   at t/db_dependent/api/v1/holds.t line 189.
ok 4 - GET /api/v1/holds?borrowernumber=659207
ok 5 - 200 OK
not ok 6 - exact match for JSON Pointer "/0/borrowernumber"
#   Failed test 'exact match for JSON Pointer "/0/borrowernumber"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: '659207'

To test:
1. Run t/db_dependent/api/v1/holds.t
2. Observe above failure
3. Apply patch
4. Observe test pass

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #15 from Josef Moravec  ---
Created attachment 57284
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57284=edit
[SIGNED-OFF] Bug 17431: Create the object we need instead of assuming something
exists

Signed-off-by: Jonathan Druart 

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Josef Moravec  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #14 from Josef Moravec  ---
Created attachment 57283
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57283=edit
[SIGNED-OFF] Bug 17431: (follow-up) Fix issuingrules

Issuingrules could had prevented holds.t from passing with error
tooManyReserves.
This patch sets issuingrules at the beginning of the test to make sure reserves
are allowed.

To test:
1. Apply patch & Run t/db_dependent/api/v1/holds.t
2. Observe test pass

Signed-off-by: Jonathan Druart 

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Josef Moravec  changed:

   What|Removed |Added

  Attachment #56656|0   |1
is obsolete||
  Attachment #56657|0   |1
is obsolete||
  Attachment #56658|0   |1
is obsolete||
  Attachment #57258|0   |1
is obsolete||

--- Comment #13 from Josef Moravec  ---
Created attachment 57282
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57282=edit
[SIGNED-OFF] Bug 17431 - Fix failing test t/db_dependent/api/v1/holds.t

This patch fixed failing test for t/db_dependent/api/v1/holds.t which was
broken
after Bug 14695.

$ perl t/db_dependent/api/v1/holds.t
...
not ok 42 - similar match for JSON Pointer "/error"
#   Failed test 'similar match for JSON Pointer "/error"'
#   at t/db_dependent/api/v1/holds.t line 291.
#   'Reserve cannot be placed. Reason: itemAlreadyOnHold'
# doesn't match '(?^u:tooManyReserves)'
# Looks like you failed 1 test of 42.
not ok 4 - Test endpoints with permission

To test:
1. Run t/db_dependent/api/v1/holds.t and observe it fail.
2. Apply patch.
3. Run the test again and observe it pass.

Signed-off-by: Marc 

Signed-off-by: Jonathan Druart 

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Lari Taskula  changed:

   What|Removed |Added

 Blocks||17565


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17565
[Bug 17565] REST API: Let user cancel reserve according to
CanReserveBeCanceledFromOpac
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #12 from Lari Taskula  ---
I'm not completely sure why changing the order of "use" in the test fixes some
issues like being unable to call GetItem in C4::Reserves. That seemed to be the
issue for returning 500 in POST /api/v1/holds. I came across with similar issue
in Reserves.t. Does the fix make sense and can somebody explain what's going
on?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #11 from Lari Taskula  ---
Created attachment 57258
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57258=edit
Bug 17431: Fix another fail in t/db_dependent/api/v1/holds.t

perl t/db_dependent/api/v1/holds.t fails with 500

ok 2 - Test endpoints without permission
# Subtest: Test endpoints without permission, but accessing own object
1..15
ok 1 - POST /api/v1/holds
not ok 2 - 201 Created
#   Failed test '201 Created'
#   at t/db_dependent/api/v1/holds.t line 189.
#  got: '500'
# expected: '201'
not ok 3 - has value for JSON Pointer "/reserve_id"
#   Failed test 'has value for JSON Pointer "/reserve_id"'
#   at t/db_dependent/api/v1/holds.t line 189.
ok 4 - GET /api/v1/holds?borrowernumber=659207
ok 5 - 200 OK
not ok 6 - exact match for JSON Pointer "/0/borrowernumber"
#   Failed test 'exact match for JSON Pointer "/0/borrowernumber"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: '659207'

To test:
1. Run t/db_dependent/api/v1/holds.t
2. Observe above failure
3. Apply patch
4. Observe test pass

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-11-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Lari Taskula  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #10 from Lari Taskula  ---
(In reply to Kyle M Hall from comment #9)
Could there be a pending database update? I could replicate it when I hadn't
run updatedatabase.pl, but after it the test passes for me.
Koha::REST::V1::authenticate_api_request will give HTTP 401 if
check_cookie_auth returns "maintenance". Perhaps 503 would be better.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Kyle M Hall  changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com
 Status|Passed QA   |Failed QA

--- Comment #9 from Kyle M Hall  ---
t/db_dependent/api/v1/holds.t .. 1/4
#   Failed test '403 Forbidden'
#   at t/db_dependent/api/v1/holds.t line 163.
#  got: '401'
# expected: '403'

#   Failed test '403 Forbidden'
#   at t/db_dependent/api/v1/holds.t line 167.
#  got: '401'
# expected: '403'

#   Failed test '403 Forbidden'
#   at t/db_dependent/api/v1/holds.t line 171.
#  got: '401'
# expected: '403'

#   Failed test '403 Forbidden'
#   at t/db_dependent/api/v1/holds.t line 175.
#  got: '401'
# expected: '403'

#   Failed test '403 Forbidden'
#   at t/db_dependent/api/v1/holds.t line 179.
#  got: '401'
# expected: '403'
# Looks like you failed 5 tests of 10.

#   Failed test 'Test endpoints without permission'
#   at t/db_dependent/api/v1/holds.t line 181.

#   Failed test '201 Created'
#   at t/db_dependent/api/v1/holds.t line 189.
#  got: '401'
# expected: '201'

#   Failed test 'has value for JSON Pointer "/reserve_id"'
#   at t/db_dependent/api/v1/holds.t line 189.

#   Failed test '200 OK'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: '401'
# expected: '200'

#   Failed test 'exact match for JSON Pointer "/0/borrowernumber"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: '109'

#   Failed test 'exact match for JSON Pointer "/0/biblionumber"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: '570'

#   Failed test 'exact match for JSON Pointer "/0/itemnumber"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: '606'

#   Failed test 'exact match for JSON Pointer "/0/expirationdate"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: '2016-10-31'

#   Failed test 'exact match for JSON Pointer "/0/branchcode"'
#   at t/db_dependent/api/v1/holds.t line 199.
#  got: undef
# expected: 'cZD9z_'
# Looks like you planned 15 tests but ran 10.
# Looks like you failed 8 tests of 10 run.

#   Failed test 'Test endpoints without permission, but accessing own object'
#   at t/db_dependent/api/v1/holds.t line 212.
Can't call method "reserve_id" on an undefined value at
t/db_dependent/api/v1/holds.t line 204.
# Looks like your test exited with 255 just after 3.
t/db_dependent/api/v1/holds.t .. Dubious, test returned 255 (wstat 65280,
0xff00)
Failed 3/4 subtests

Test Summary Report
---
t/db_dependent/api/v1/holds.t (Wstat: 65280 Tests: 3 Failed: 2)
  Failed tests:  2-3
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 4 tests but ran 3.
Files=1, Tests=3,  8 wallclock secs ( 0.04 usr  0.01 sys +  7.27 cusr  0.28
csys =  7.60 CPU)
Result: FAIL

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #8 from Jonathan Druart  
---
Created attachment 56658
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56658=edit
Bug 17431: Create the object we need instead of assuming something exists

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #7 from Jonathan Druart  
---
Created attachment 56657
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56657=edit
Bug 17431: (follow-up) Fix issuingrules

Issuingrules could had prevented holds.t from passing with error
tooManyReserves.
This patch sets issuingrules at the beginning of the test to make sure reserves
are allowed.

To test:
1. Apply patch & Run t/db_dependent/api/v1/holds.t
2. Observe test pass

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Jonathan Druart  changed:

   What|Removed |Added

  Attachment #56288|0   |1
is obsolete||
  Attachment #56655|0   |1
is obsolete||

--- Comment #6 from Jonathan Druart  
---
Created attachment 56656
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56656=edit
Bug 17431 - Fix failing test t/db_dependent/api/v1/holds.t

This patch fixed failing test for t/db_dependent/api/v1/holds.t which was
broken
after Bug 14695.

$ perl t/db_dependent/api/v1/holds.t
...
not ok 42 - similar match for JSON Pointer "/error"
#   Failed test 'similar match for JSON Pointer "/error"'
#   at t/db_dependent/api/v1/holds.t line 291.
#   'Reserve cannot be placed. Reason: itemAlreadyOnHold'
# doesn't match '(?^u:tooManyReserves)'
# Looks like you failed 1 test of 42.
not ok 4 - Test endpoints with permission

To test:
1. Run t/db_dependent/api/v1/holds.t and observe it fail.
2. Apply patch.
3. Run the test again and observe it pass.

Signed-off-by: Marc 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #5 from Lari Taskula  ---
Does this patch fix it?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #4 from Lari Taskula  ---
Created attachment 56655
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56655=edit
Bug 17431: (follow-up) Fix issuingrules

Issuingrules could had prevented holds.t from passing with error
tooManyReserves.
This patch sets issuingrules at the beginning of the test to make sure reserves
are allowed.

To test:
1. Apply patch & Run t/db_dependent/api/v1/holds.t
2. Observe test pass

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org,
   ||tomasco...@gmail.com

--- Comment #3 from Jonathan Druart  
---
The tests still don't pass, Tomas could you have a look?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Lari Taskula  changed:

   What|Removed |Added

 Depends on||14695


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14695
[Bug 14695] Add ability to place multiple item holds on a given record per
patron
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Marc Véron  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off
 CC||ve...@veron.ch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Marc Véron  changed:

   What|Removed |Added

  Attachment #56252|0   |1
is obsolete||

--- Comment #2 from Marc Véron  ---
Created attachment 56288
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56288=edit
Bug 17431 - Fix failing test t/db_dependent/api/v1/holds.t

This patch fixed failing test for t/db_dependent/api/v1/holds.t which was
broken
after Bug 14695.

$ perl t/db_dependent/api/v1/holds.t
...
not ok 42 - similar match for JSON Pointer "/error"
#   Failed test 'similar match for JSON Pointer "/error"'
#   at t/db_dependent/api/v1/holds.t line 291.
#   'Reserve cannot be placed. Reason: itemAlreadyOnHold'
# doesn't match '(?^u:tooManyReserves)'
# Looks like you failed 1 test of 42.
not ok 4 - Test endpoints with permission

To test:
1. Run t/db_dependent/api/v1/holds.t and observe it fail.
2. Apply patch.
3. Run the test again and observe it pass.

Signed-off-by: Marc 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Lari Taskula  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |lari.task...@jns.fi
   |ity.org |

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

--- Comment #1 from Lari Taskula  ---
Created attachment 56252
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56252=edit
Bug 17431 - Fix failing test t/db_dependent/api/v1/holds.t

This patch fixed failing test for t/db_dependent/api/v1/holds.t which was
broken
after Bug 14695.

$ perl t/db_dependent/api/v1/holds.t
...
not ok 42 - similar match for JSON Pointer "/error"
#   Failed test 'similar match for JSON Pointer "/error"'
#   at t/db_dependent/api/v1/holds.t line 291.
#   'Reserve cannot be placed. Reason: itemAlreadyOnHold'
# doesn't match '(?^u:tooManyReserves)'
# Looks like you failed 1 test of 42.
not ok 4 - Test endpoints with permission

To test:
1. Run t/db_dependent/api/v1/holds.t and observe it fail.
2. Apply patch.
3. Run the test again and observe it pass.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Lari Taskula  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff
   Patch complexity|--- |Trivial patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 17431] Fix failing test t/db_dependent/api/v1/holds.t

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17431

Lari Taskula  changed:

   What|Removed |Added

Summary|REST API: Fix failing test  |Fix failing test
   |t/db_dependent/api/v1/holds |t/db_dependent/api/v1/holds
   |.t  |.t

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/