diff options
| author | Casey Dahlin <cdahlin@redhat.com> | 2008-10-13 15:46:54 -0400 |
|---|---|---|
| committer | Casey Dahlin <cdahlin@redhat.com> | 2008-10-13 15:46:54 -0400 |
| commit | 67a9846cf95f316a03de49c4956e54c94fe107bd (patch) | |
| tree | 605063b0090163ffdcf7bd8d4ed1e234144e5506 | |
| parent | 1ef4525772b1be1bacae68998a3fdc2ae6295829 (diff) | |
| download | upstate-67a9846cf95f316a03de49c4956e54c94fe107bd.tar.gz upstate-67a9846cf95f316a03de49c4956e54c94fe107bd.tar.xz upstate-67a9846cf95f316a03de49c4956e54c94fe107bd.zip | |
Tests for release behavior
introduce tests to make sure releasing and dropping act correctly
| -rw-r--r-- | test.rb | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -103,4 +103,27 @@ class TC_State < Test::Unit::TestCase "BangState{} (down)" ) end + + def test_release_noop + test_epsilon + Bar.release(:user) + assert_only_states( + 'BazState{:tom=>"abc"} (up)', + 'FooState{} (down)', + 'FooState{:bob=>"abc"} (up)', + "BarState{} (up)", + "BamState{} (up)", + "BangState{} (down)" + ) + end + + def test_drop_cleanup + test_release_noop + Bar.get_all.each{ |x| x.drop } + assert_only_states( + 'FooState{} (down)', + 'FooState{:bob=>"abc"} (up)', + "BarState{} (down)" + ) + end end |
