mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | doesn't display clients without agencies on the print select page
This commit is contained in:
@@ -8,6 +8,16 @@ describe ClientsController do
|
||||
sign_in user
|
||||
end
|
||||
|
||||
describe "#print_select" do
|
||||
it "only assigns clients with a bike and an agency" do
|
||||
client_with_bike_and_agency = create :client, bike: create(:bike), agency: create(:agency)
|
||||
create :client, bike: create(:bike)
|
||||
create :client, agency: create(:agency)
|
||||
get :print_select
|
||||
expect(assigns(:clients)).to eq [client_with_bike_and_agency]
|
||||
end
|
||||
end
|
||||
|
||||
describe "PUT #update" do
|
||||
xit "updates a client with an application date" do
|
||||
put :update, id: client.id, client: {application_date: "12/21/2015"}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
FactoryGirl.define do
|
||||
factory :agency do
|
||||
sequence(:name) { |n| "Agency #{n}" }
|
||||
end
|
||||
end
|
||||
@@ -4,6 +4,5 @@ FactoryGirl.define do
|
||||
last_name "Doe"
|
||||
application_date Date.new(2010, 03, 02)
|
||||
gender "Male"
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user