Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_create
- num_admins = Admin.count
- post :create, :admin => admins(:admin)
- assert_response :redirect
- assert_redirected_to :action => 'list'
- assert_equal num_admins 1, Admin.count
- end
- in the fixture there is:
- <% SALT = "saltyNut24ucr4cK3r" unless defined?(SALT) %>
- admin:
- id: 1
- username: admin
- password: <%= Admin.sha1(SALT, 'test123') %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement