Feature: Returning books
Books come back to the desk or to the book drop, and go back on the shelf.
- Given "Ana" borrowed "The Hobbit" 10 days ago
- When "Ana" returns "The Hobbit"
- Then "The Hobbit" is on the shelf
- And "Ana" owes nothing
- Given "Ana" borrowed "The Hobbit" 30 days ago
- When "Ana" returns "The Hobbit"
- Then "Ana" owes 0.90 in fines
- And the receipt reads:
Ana, card 1024 The Hobbit: 9 days late, 0.90 Total: 0.90 Three quotes, as they are printed: """
- Given "Ana" borrowed the <kind> "<title>" <days> days ago
- When "Ana" returns "<title>"
- Then "Ana" owes <fine> in fines
Runs once for each row of these examples:
-
kind title days fine book Emma 22 0.10 film Metropolis 9 1.00 - Given "Ana" borrowed the book "Emma" 22 days ago
- When "Ana" returns "Emma"
- Then "Ana" owes 0.10 in fines
- Given "Ana" borrowed the film "Metropolis" 9 days ago
- When "Ana" returns "Metropolis"
- Then "Ana" owes 1.00 in fines