- test "invoke setup with existing uuid in user, verify response" do
- authorize_with :admin
- inactive_user = users(:inactive)
-
- post :setup, {
- user: {uuid: inactive_user['uuid']},
- openid_prefix: 'https://www.google.com/accounts/o8/id'
- }
-
- assert_response :success
-
- response_items = JSON.parse(@response.body)['items']
- resp_obj = find_obj_in_resp response_items, 'User', nil
-
- assert_not_nil resp_obj['uuid'], 'expected uuid for the new user'
- assert_equal inactive_user['uuid'], resp_obj['uuid']
- assert_equal inactive_user['email'], resp_obj['email'],
- 'expecting inactive user email'
- end
-