Hi all,
I am having problems writing data in the test database. I have a
functional test method that calls a method in my application, which is
creating a new object and saving it. Although fc.save! returns “true”,
nothing is written in the database…
Thanks for your help,
Vic
my method:
def test_should_add_criterion
get :add_criterion, { :id=>filters(:one).id }, {
:current_context_id=>1, :current_user_id=>1}
old_count = FilterCriterion.count
end
in the application:
def add_criterion
fc = FilterCriterion.new
fc.save! # this returns true (but no save)…
end