mirror of
https://github.com/iv-org/invidious.git
synced 2025-11-04 14:18:30 -06:00
Commit the whole ./lib/ folder which stores the Crystal dependencies. This has a few benefits: - Allows to build the project without a connection to the Internet to retrieve dependencies. - Makes the project resistant against dependency re-tags which might include malicious code.
29 lines
766 B
Crystal
29 lines
766 B
Crystal
require "../spec_helper"
|
|
|
|
module PG
|
|
class Connection
|
|
getter connection
|
|
end
|
|
end
|
|
|
|
describe PQ::Connection, "#server_parameters" do
|
|
it "ParameterStatus frames in response to set are handeled" do
|
|
get = ->{ PG_DB.using_connection &.connection.server_parameters["standard_conforming_strings"] }
|
|
get.call.should eq("on")
|
|
PG_DB.exec "set standard_conforming_strings to on"
|
|
get.call.should eq("on")
|
|
PG_DB.exec "set standard_conforming_strings to off"
|
|
get.call.should eq("off")
|
|
PG_DB.exec "set standard_conforming_strings to default"
|
|
get.call.should eq("on")
|
|
end
|
|
end
|
|
|
|
describe PQ::Connection do
|
|
it "handles empty queries" do
|
|
PG_DB.exec ""
|
|
PG_DB.query("") { }
|
|
PG_DB.query_one("select 1", &.read).should eq(1)
|
|
end
|
|
end
|