Opened from disk

This site is meant to be served, so its folder tree and search do not work when a page is opened from disk. Run ghg serve in the folder of your ghg.toml, or serve the site's folder with any web server, then open the address it gives.

Skip to content
Theme

Feature: Returning books

Books come back to the desk or to the book drop, and go back on the shelf.

  1. Given "Ana" borrowed "The Hobbit" 10 days ago
  2. When "Ana" returns "The Hobbit"
  3. Then "The Hobbit" is on the shelf
  4. And "Ana" owes nothing

  1. Given "Ana" borrowed "The Hobbit" 30 days ago
  2. When "Ana" returns "The Hobbit"
  3. Then "Ana" owes 0.90 in fines
  4. And the receipt reads:
    Ana, card 1024
    The Hobbit: 9 days late, 0.90
    Total: 0.90
    Three quotes, as they are printed: """

  1. Given "Ana" borrowed the <kind> "<title>" <days> days ago
  2. When "Ana" returns "<title>"
  3. Then "Ana" owes <fine> in fines

Runs once for each row of these examples: