Skip to content

Commit

Permalink
[MNO-287] Add developer section test
Browse files Browse the repository at this point in the history
  • Loading branch information
hedudelgado committed Nov 24, 2016
1 parent 1944302 commit 8c23216
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ def hash_for(res)
end
end

describe 'PUT #register_developer' do
before { api_stub_for(put: "/users/#{user.id}", response: from_api(user)) }
before { sign_in user }
subject { put :register_developer}

describe 'logged in' do
before { subject }
it { expect(response).to be_success }
end
end

describe 'PUT #update_password' do
let(:attrs) { {current_password: 'password', password: 'blablabla', password_confirmation: 'blablabla'} }
before { api_stub_for(put: "/users/#{user.id}", response: from_api(user)) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ module MnoEnterprise
expect(put('/jpi/v1/current_user')).to route_to("mno_enterprise/jpi/v1/current_users#update")
end

it 'routes to #register_developer' do
expect(put('/jpi/v1/current_user/register_developer')).to route_to("mno_enterprise/jpi/v1/current_users#register_developer")
end

it 'routes to #update_password' do
expect(put('/jpi/v1/current_user/update_password')).to route_to("mno_enterprise/jpi/v1/current_users#update_password")
end
Expand Down

0 comments on commit 8c23216

Please sign in to comment.