not using real emails/domains in tests
This commit is contained in:
parent
2b749fb1c5
commit
aa0005ef6e
1 changed files with 4 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ describe Admin::UsersController do
|
||||||
end
|
end
|
||||||
describe 'GET #index' do
|
describe 'GET #index' do
|
||||||
it 'populates an array of users' do
|
it 'populates an array of users' do
|
||||||
user1 = create(:user, email: 'gopesh.7500@gmail.com')
|
user1 = create(:user, email: 'user1@email.osem')
|
||||||
user2 = create(:user, email: 'gopesh_750@gmail.com')
|
user2 = create(:user, email: 'user2@email.osem')
|
||||||
get :index
|
get :index
|
||||||
expect(assigns(:users)).to match_array([user, admin, user1, user2])
|
expect(assigns(:users)).to match_array([user, admin, user1, user2])
|
||||||
end
|
end
|
||||||
|
|
@ -26,8 +26,8 @@ describe Admin::UsersController do
|
||||||
it 'changes @users attributes' do
|
it 'changes @users attributes' do
|
||||||
patch :update, id: user.id
|
patch :update, id: user.id
|
||||||
expect(build(
|
expect(build(
|
||||||
:user, email: 'example@incoherent.de', id: user.id).email).
|
:user, email: 'new@email.osem', id: user.id).email).
|
||||||
to eq('example@incoherent.de')
|
to eq('new@email.osem')
|
||||||
end
|
end
|
||||||
it 'redirects to the updated user' do
|
it 'redirects to the updated user' do
|
||||||
patch :update, id: user.id
|
patch :update, id: user.id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue