Skip to content

Instantly share code, notes, and snippets.

@deathbob
Created January 20, 2011 18:06
Show Gist options
  • Select an option

  • Save deathbob/788281 to your computer and use it in GitHub Desktop.

Select an option

Save deathbob/788281 to your computer and use it in GitHub Desktop.
require 'test_helper'
class Admin::ArticlesControllerTest < ActionController::TestCase
setup do
@article = articles(:one)
@typus_user = AdminUser.first
@request.session[:typus_user_id] = @typus_user.id
@request.env['HTTP_REFERER'] = '/admin/articles'
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:articles)
end
end
Started
F...
Finished in 0.289338 seconds.
1) Failure:
test_should_get_index(Admin::ArticlesControllerTest) [/test/functional/admin/articles_controller_test.rb:14]:
Expected response to be a <:success>, but was <302>
4 tests, 4 assertions, 1 failures, 0 errors
rake aborted!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment