Skip to content

Commit

Permalink
fix: only check positive ID for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Dec 11, 2023
1 parent 1431452 commit e272512
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions acceptance/cases/transactions/read_write_transactions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,15 @@ def test_pdml
def test_create_record_with_sequence
record = TableWithSequence.create name: "Some name", age: 40
assert record.id, "ID should be generated and returned by the database"
assert record.id > 0, "ID should be positive"
assert record.id > 0, "ID should be positive" unless ENV["SPANNER_EMULATOR_HOST"]
end

def test_create_record_with_sequence_in_transaction
record = TableWithSequence.transaction do
TableWithSequence.create name: "Some name", age: 40
end
assert record.id, "ID should be generated and returned by the database"
unless ENV["SPANNER_EMULATOR_HOST"]
assert record.id > 0, "ID should be positive"
end
assert record.id > 0, "ID should be positive" unless ENV["SPANNER_EMULATOR_HOST"]
end

def test_create_record_with_sequence_using_mutations
Expand Down

0 comments on commit e272512

Please sign in to comment.