Fixed houndci violations
This commit is contained in:
parent
c97affca35
commit
d50fd3cc23
2 changed files with 4 additions and 9 deletions
|
|
@ -1,26 +1,21 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Admin::UsersController do
|
||||
|
||||
before(:each) do
|
||||
@user = create(:user)
|
||||
@admin = create(:admin)
|
||||
sign_in(@admin)
|
||||
end
|
||||
|
||||
describe "GET '#index'" do
|
||||
|
||||
it 'populates an array of users' do
|
||||
user1 = create(:user, email:"gopesh.7500@gmail.com")
|
||||
user2 = create(:user,email:"gopesh@gmail.com")
|
||||
user1 = create(:user, email: "gopesh.7500@gmail.com")
|
||||
user2 = create(:user, email: "gopesh@gmail.com")
|
||||
get :index
|
||||
# pp response.body
|
||||
expect(assigns(:users)).to match_array([@user,@admin,user1,user2])
|
||||
end
|
||||
|
||||
it 'renders index template' do
|
||||
get :index
|
||||
# pp response.body
|
||||
expect(response).to render_template :index
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
FactoryGirl.define do
|
||||
factory :user do
|
||||
sequence(:email) {|n|'name#{n}@example.com'}
|
||||
sequence(:email) { |n| 'name#{n}@example.com' }
|
||||
password 'changeme'
|
||||
password_confirmation 'changeme'
|
||||
confirmed_at Time.now
|
||||
end
|
||||
factory :admin, class: User do
|
||||
sequence(:email) {|n|'gopesh#{n}@exampleco.in'}
|
||||
sequence(:email) { |n| 'gopesh#{n}@exampleco.in' }
|
||||
password 'changeme'
|
||||
password_confirmation 'changeme'
|
||||
confirmed_at Time.now
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue