test/shoden_test.rb in shoden-0.1.0 vs test/shoden_test.rb in shoden-0.1.1

- old
+ new

@@ -5,10 +5,14 @@ class User < Shoden::Model attribute :name end +setup do + Shoden.destroy_all +end + test 'model' do model = Model.create assert_equal model.id.class, Fixnum end @@ -51,6 +55,15 @@ sprout = tree.sprouts.create(leaves: 4) assert sprout.is_a?(Sprout) assert_equal sprout.tree.id, tree.id +end + +test 'deletion' do + user = User.create(name: 'Damian') + id = user.id + + user.destroy + + assert_raise(Shoden::NotFound) { User[id] } end