send_jsoncome from (referenced here: https://luckyframework.org/guides/testing/testing-actions#json-actions)?
undefined method 'send_json' for top-level
I've got this spec:
it "returns a 503 (Service Unavailable) when HTML conversions are disabled" do ENV["DISABLE_HTML_CONVERSION_API"] = "Shut it down!" response = AppClient.exec(Api::HtmlConversions::Create.with(input: "<div>Test</div>")) puts response response.status_code.should eq(503) end
before action, where it complains that the ENV key is missing:
private def halt_if_html_conversion_disabled puts ENV["DISABLE_HTML_CONVERSION_API"] if ENV["DISABLE_HTML_CONVERSION_API"]? head :service_unavailable else continue end end
putsstatements are just temporary :smile:)
@jwoertink After some investigating, it seems Avram connects on
host rather than
local for Posgres. So the solution to get password-less DB connections working was to add this to my pg_hba.conf
local all mwlang peer host all mwlang 127.0.0.1/32 peer
which was kind of unexpected that both are needed because I would expect
localhost as the hostname to resolve to the
local entry always.
createdbis running and is looking for
template0even though the test database already exists.
Unhandled exception: It looks like Postgres is not running. Message from Postgres: createdb: error: could not connect to database template1: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
peeras I was previously