2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/utils/database_helpers"
|
2018-03-01 19:30:07 +00:00
|
|
|
|
|
|
|
describe DatabaseHelper do
|
|
|
|
describe DatabaseHelper::SQLColumn do
|
2019-06-11 22:24:35 +00:00
|
|
|
def column(row = { "test" => "value" })
|
|
|
|
DatabaseHelper::SQLColumn.new(row, "test")
|
2018-03-01 19:30:07 +00:00
|
|
|
end
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
it "has a valid column value" do
|
|
|
|
column.value.must_equal "value"
|
2018-03-01 19:30:07 +00:00
|
|
|
end
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
it "returns empty when nil" do
|
|
|
|
column(nil).value.must_equal ""
|
2018-03-01 19:30:07 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|