mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Added to fixtures a user with a SHA-1 password
This commit is contained in:
parent
e7301608a6
commit
34e0573fc4
3 changed files with 12 additions and 2 deletions
10
test/fixtures/users.yml
vendored
10
test/fixtures/users.yml
vendored
|
|
@ -48,3 +48,13 @@ ldap_user:
|
||||||
first_name: International
|
first_name: International
|
||||||
last_name: Harvester
|
last_name: Harvester
|
||||||
auth_type: CAS
|
auth_type: CAS
|
||||||
|
|
||||||
|
user_with_sha1_password:
|
||||||
|
id: 6
|
||||||
|
login: mr_deprecated
|
||||||
|
crypted_password: <%= Digest::SHA1::hexdigest("#{Tracks::Config.salt}--foobar--") %>
|
||||||
|
token: <%= Digest::SHA1.hexdigest("mr_deprecatedSun Feb 19 14:42:45 GMT 20060.408173979260027") %>
|
||||||
|
is_admin: false
|
||||||
|
first_name: Mister
|
||||||
|
last_name: Deprecated
|
||||||
|
auth_type: database
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class UsersControllerTest < ActionController::TestCase
|
||||||
get :index
|
get :index
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_equal "TRACKS::Manage Users", assigns['page_title']
|
assert_equal "TRACKS::Manage Users", assigns['page_title']
|
||||||
assert_equal 4, assigns['total_users']
|
assert_equal 5, assigns['total_users']
|
||||||
assert_equal "/users", session['return-to']
|
assert_equal "/users", session['return-to']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class UsersXmlApiTest < ActionController::IntegrationTest
|
||||||
get '/users.xml', {}, basic_auth_headers()
|
get '/users.xml', {}, basic_auth_headers()
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_tag :tag => "users",
|
assert_tag :tag => "users",
|
||||||
:children => { :count => 4, :only => { :tag => "user" } }
|
:children => { :count => 5, :only => { :tag => "user" } }
|
||||||
assert_no_tag :tag => "password"
|
assert_no_tag :tag => "password"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue