Bike database interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
414 B

require 'spec_helper'
describe Bike do
describe "#post_to_bike_index" do
it "calls BikeIndexLogger if no bike_index_id is present" do
expect(BikeIndexLogger).to receive(:perform_async)
create(:bike, bike_index_id: nil)
end
it "returns true if bike_index_id is present" do
bike = create(:bike, bike_index_id: 1)
expect(bike.post_to_bike_index).to be_truthy
end
end
end