Commit d14eec8cea54e7966e3fdfadabf5ae102e342113

Authored by Leandro Santos
1 parent 1ed260f3

fix unit tests of api

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
test/unit/api/session_test.rb
... ... @@ -173,6 +173,7 @@ class SessionTest < ActiveSupport::TestCase
173 173  
174 174 should 'change user password and close task' do
175 175 user = create_user
  176 + user.activate
176 177 task = ChangePassword.create!(:requestor => user.person)
177 178 params = {:code => task.code, :password => 'secret', :password_confirmation => 'secret'}
178 179 patch "/api/v1/new_password?#{params.to_query}"
... ... @@ -184,6 +185,7 @@ class SessionTest < ActiveSupport::TestCase
184 185  
185 186 should 'do not change user password when password confirmation is wrong' do
186 187 user = create_user
  188 + user.activate
187 189 task = ChangePassword.create!(:requestor => user.person)
188 190 params = {:code => task.code, :password => 'secret', :password_confirmation => 's3cret'}
189 191 patch "/api/v1/new_password?#{params.to_query}"
... ...