mirror of
https://github.com/inspec/inspec
synced 2024-12-18 09:03:12 +00:00
dd033fbf1b
* Fixing bug where the row data returned is nil Signed-off-by: Noel Georgi <noel.georgi@reancloud.com>
19 lines
381 B
Ruby
19 lines
381 B
Ruby
# encoding: utf-8
|
|
|
|
require 'helper'
|
|
|
|
describe DatabaseHelper do
|
|
describe DatabaseHelper::SQLColumn do
|
|
def column(row = { 'test' => 'value' })
|
|
DatabaseHelper::SQLColumn.new(row, 'test')
|
|
end
|
|
|
|
it 'has a valid column value' do
|
|
column.value.must_equal 'value'
|
|
end
|
|
|
|
it 'returns empty when nil' do
|
|
column(nil).value.must_equal ''
|
|
end
|
|
end
|
|
end
|