Skip to content

Commit

Permalink
Updated user factory
Browse files Browse the repository at this point in the history
* added office
* fixed office_controller_spec
  • Loading branch information
colinbruce committed May 5, 2015
1 parent 31f2de0 commit c1dbed0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/controllers/offices_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
it 'assigns all offices as @offices' do
office = Office.create! valid_attributes
get :index, {}, valid_session
expect(assigns(:offices)).to eq([office])
expect(assigns(:offices)).to include(office)
end
end

Expand Down Expand Up @@ -143,7 +143,7 @@
it 'assigns all offices as @offices' do
office = Office.create! valid_attributes
get :index, {}, valid_session
expect(assigns(:offices)).to eq([office])
expect(assigns(:offices)).to include(office)
end
end

Expand Down
1 change: 1 addition & 0 deletions spec/factories/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
sequence(:email) { |n| "user_#{n}@digital.justice.gov.uk" }
password 'password'
name 'user'
association :office
factory :admin_user do
role 'admin'
end
Expand Down

0 comments on commit c1dbed0

Please sign in to comment.