Skip to content

Commit

Permalink
customer model tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
aruna79 committed May 7, 2018
1 parent f8c4eec commit f27dd84
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/models/customer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

describe Customer do
let(:customer) { Customer.new }
let(:customer) { customers(:Mary)}
let(:customer) { customers(:mary)}

describe "relations" do
it "has a list of rentals" do
mary = customers(:mary)
mary.must_respond_to :rentals
mary.rentals.each do |rental|
mary.must_be_kind_of Rental

customer.rentals.each do |rental|
rental.must_be_kind_of Rental
rental.customer.must_be_instance_of Customer
rental.customer.must_equal mary
end
end

Expand Down

0 comments on commit f27dd84

Please sign in to comment.