diff --git a/spec/posting_spec.lua b/spec/posting_spec.lua index 25cc954..3935b58 100644 --- a/spec/posting_spec.lua +++ b/spec/posting_spec.lua @@ -1,6 +1,7 @@ _G.spy = spy local mock_env = require("spec.env_mock") local fuzzy = require("spec.fuzzgen") +require("spec.utils") describe("smr",function() setup(mock_env.setup) @@ -35,6 +36,8 @@ describe("smr",function() } index_get(get_req) assert.stub(pages_mock.index).was_called() - pending("TODO") + assertf(get_req.responsecode >= 200 and get_req.responsecode < 300, "Should give a 2XX response code, got %d", get_req.responsecode) + assert(get_req.responsecode == 200, "Error code should be 200 - OK") + assert(get_req.response:find(get_req.response,1,true), "Failed to find title in string") end) end)