Displaying 1 result from an estimated 1 matches for "bmxentry".
Did you mean:
bm_entry
2008 Feb 05
1
Functional Test has error when testing controller updates_attribute of its parrent.
...llerTest < ActionController::TestCase
def test_should_create_vote
assert_difference(''Vote.count'') do
post :create, {:vote => {:vote_value => 5,
:user_id => users(:nick).id,
:entry_id => entries(:BmxEntry).id}},
:user_id => users(:nick).id
end
assert_redirected_to vote_path(assigns(:vote))
end
end
This tests the :create action of the vote controller which looks like
this.
def create
@vote = Vote.new(params[:vote])
respond_to do |format|
if @vote.sav...