mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
lk | adds explanatory text to waiting list & disables mark_as_sold button for sold bikes, and removes unused columns
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user