Skip to content

Instantly share code, notes, and snippets.

@mkoby
Created July 6, 2010 02:24
Show Gist options
  • Save mkoby/464924 to your computer and use it in GitHub Desktop.
Save mkoby/464924 to your computer and use it in GitHub Desktop.
test "should create band" do
assert_difference('Band.count') do
assert_difference('User.count') do
post :create, :band => { :name => "MyBand",
:website => "www.myband.com",
:hometown_city => "Houston",
:hometown_state => "TX",
:subdomain => "myband" },
:user => { :band => assigns(:band),
:username => "testuser",
:email_address => "[email protected]",
:first_name => "Test",
:last_name => "User",
:password => "1234",
:password_confirmation => "1234" }
end
end
end
@angelseye
Copy link

  1. Failure:
    test_should_create_band(BandsControllerTest)
    [(eval):3:in each_with_index' /test/functional/bands_controller_test.rb:23:intest_should_create_band'
    /test/functional/bands_controller_test.rb:22:in `test_should_create_band']:
    "User.count" didn't change by 1.
    <6> expected but was
    <5>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment