lk | adds explanatory text to waiting list & disables mark_as_sold button for sold bikes, and removes unused columns

This commit is contained in:
Louis Knapp
2016-07-30 20:58:56 -05:00
parent cc3f684e01
commit 9c53f81672
10 changed files with 27 additions and 118 deletions
+12
View File
@@ -1,6 +1,18 @@
require 'spec_helper'
describe Bike do
describe "#sold?" do
it "returns true if the date_sold is present" do
bike = build :bike, date_sold: Time.zone.now
expect(bike.sold?).to be true
end
it "returns false if date_sold is not present" do
bike = build :bike
expect(bike.sold?).to be false
end
end
describe "#post_to_bike_index" do
it "does not calls BikeIndexLogger if no bike_index_id is present" do
expect(BikeIndexLogger).not_to receive(:perform_async)