Skip to content

Commit

Permalink
Fix to test of time to avoid timezone issues
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoneira committed Nov 28, 2019
1 parent e761dbb commit 14d46fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/nql/syntax_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ def parse(expression)

right_hand_operand = tree.proposition.right
right_hand_operand.must_be_instance_of Rasti::DB::NQL::Nodes::Constants::Time
right_hand_operand.value.must_equal '2019-03-27 12:20:00 -0300'
right_hand_operand.value.must_equal Timing::TimeInZone.parse('2019-03-27T12:20:00').to_s
end

it 'must parse expression with date, hours, minutes, seconds and timezone' do
tree = parse 'column > 2019-03-27T12:20:00-03:00'

right_hand_operand = tree.proposition.right
right_hand_operand.must_be_instance_of Rasti::DB::NQL::Nodes::Constants::Time
right_hand_operand.value.must_equal '2019-03-27 12:20:00 -0300'
right_hand_operand.value.must_equal Timing::TimeInZone.parse('2019-03-27T12:20:00-03:00').to_s
end

end
Expand Down

0 comments on commit 14d46fa

Please sign in to comment.