diff options
Diffstat (limited to 'test/fresh.rb')
-rw-r--r-- | test/fresh.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test/fresh.rb b/test/fresh.rb index 749673f..4db1e2c 100644 --- a/test/fresh.rb +++ b/test/fresh.rb @@ -90,17 +90,14 @@ EOF @admin.create_domain(domain) yield_for_monitor_update { @admin.get_domains.include?(domain) and break } - assert_nothing_raised do - @admin.create_class(domain, "klassy", 1) - end + @admin.create_class(domain, "klassy", 1) + assert_raises(MogileFS::Backend::ClassExistsError) do @admin.create_class(domain, "klassy", 1) end - assert_nothing_raised do - @admin.update_class(domain, "klassy", - :mindevcount => 1, :replpolicy => "MultipleHosts(1)") - end + @admin.update_class(domain, "klassy", + :mindevcount => 1, :replpolicy => "MultipleHosts(1)") tmp = nil yield_for_monitor_update do @@ -110,7 +107,7 @@ EOF assert tmp, "domain did not show up" assert_equal 1, tmp["mindevcount"] assert_equal "MultipleHosts(1)", tmp["replpolicy"] - assert_nothing_raised { @admin.update_class(domain, "klassy", 2) } + @admin.update_class(domain, "klassy", 2) ensure @admin.delete_class(domain, "klassy") rescue nil end |