I have a simple controller test based on the Rails 4 docs (using Test::Unit):
test \"should create user\" do
assert_difference(\'User.count\') do
post
It seems like the data that is being POST
ed to your create
route is just a string, instead of a hash of attributes. What does users(:sample_user)
return? Is it just an ID, or maybe an ActiveRecord object that is not being serialized correctly? If it's AR, maybe you need to send users(:sample_user).attributes
as the payload?