Skip to content

Commit

Permalink
One more error check.
Browse files Browse the repository at this point in the history
  • Loading branch information
JEG2 committed Jun 18, 2008
1 parent 176c706 commit 675ec68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/tc_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ def test_fields_are_retyped_on_claim
assert_match(/\ACOUNTER:/, @db.fields(true)["b"])
end

def test_bad_schema_for_update_raises_tune_error
RRDB.config(:reserve_fields => 2)
@db.update(Time.now, :a => 1)
RRDB.config(:data_sources => {:b => "BAD_FIELD_TYPE"})
assert_raise(RRDB::TuneError) { @db.update(Time.now + 10, :b => 2) }
end

def test_running_out_of_fields_to_claim_raises_fields_exhausted_error
RRDB.config(:reserve_fields => 3)
test_update_claims_new_fields_as_needed
Expand Down

0 comments on commit 675ec68

Please sign in to comment.