test/functional/test_modifiers.rb in mongo_mapper-unstable-2010.1.6 vs test/functional/test_modifiers.rb in mongo_mapper-unstable-2010.1.12

- old
+ new

@@ -233,6 +233,20 @@ page.tags.should == %w(foo) page2.reload page.tags.should == %w(foo) end + + should "be able to remove the last element the array" do + page = @page_class.create(:title => 'Home', :tags => %w(foo bar)) + @page_class.pop(page.id, :tags => 1) + page.reload + page.tags.should == %w(foo) + end + + should "be able to remove the first element of the array" do + page = @page_class.create(:title => 'Home', :tags => %w(foo bar)) + @page_class.pop(page.id, :tags => -1) + page.reload + page.tags.should == %w(bar) + end end \ No newline at end of file