Sha256: 5766268db8d7638d65555e325e2ee5f066dcf2e8089c422e4ada6357ffb7175a
Contents?: true
Size: 329 Bytes
Versions: 4
Compression:
Stored size: 329 Bytes
Contents
require_relative "../lib/tynn/json" test "json" do Tynn.plugin(Tynn::JSON) Tynn.define do root do json(name: "tynn") end end app = Tynn::Test.new app.get("/") json = JSON.parse(app.res.body) assert_equal "tynn", json["name"] assert_equal "application/json", app.res.headers["Content-Type"] end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tynn-1.4.0 | test/json_test.rb |
tynn-1.3.0 | test/json_test.rb |
tynn-1.2.0 | test/json_test.rb |
tynn-1.1.0 | test/json_test.rb |