diff --git a/spec/author_bio_spec.lua b/spec/author_bio_spec.lua
index 70a18a4..a703de7 100644
--- a/spec/author_bio_spec.lua
+++ b/spec/author_bio_spec.lua
@@ -2,7 +2,7 @@ _G.spy = spy
local mock_env = require("spec.env_mock")
local rng = require("spec.fuzzgen")
-describe("smr biography #todo",function()
+describe("smr biography",function()
setup(mock_env.setup)
teardown(mock_env.teardown)
it("should allow users to set their biography",function()
@@ -59,60 +59,11 @@ describe("smr biography #todo",function()
method = "GET",
host = username .. ".test.host",
path = "/_bio",
- cookies = {
- session = sessionid
- },
+ cookies = {session = sessionid},
args = {}
}
bio_get(edit_bio_req_get)
assert(edit_bio_req_get.responsecode == 200)
- --[=[
- local paste_req_post = {
- method = "POST",
- host = username .. ".test.host",
- path = "/_paste",
- cookies = {
- session = sessionid
- },
- args = {
- title = "post title",
- text = "post text",
- markup = "plain",
- tags = "",
- }
- }
- paste_post(paste_req_post)
- for row in db.conn:rows("SELECT COUNT(*) FROM posts") do
- assert(row[1] == 1, "Expected exactly 1 post in sample db")
- end
- local code = paste_req_post.responsecode
- assert(code >= 300 and code <= 400, "Should receive a redirect after posting, got:" .. tostring(code))
- assert(paste_req_post.response_headers, "Should have received some response headers")
- assert(paste_req_post.response_headers.Location, "Should have received a location in response headers")
- local redirect = paste_req_post.response_headers.Location:match("(/[^/]*)$")
- local read_req_get = {
- method = "GET",
- host = username .. ".test.host",
- path = redirect,
- cookies = {
- session = sessionid
- },
- args = {}
- }
- read_get(read_req_get)
- local response = read_req_get.response
- assert(
- response:find([[post title]]),
- "Failed to find post title in response."
- )
- assert(
- response:find('By ' .. username .. ''),
- "Failed to find the author name after a paste."
- )
- assert(
- response:find([[post text]]),
- "Failed to find post text in response."
- )
- ]=]
+ assert(edit_bio_req_get.response:find("