mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
* Update factories * Switch to Firefox headless with Selenium * Fix shoulda setup
14 lines
283 B
Ruby
14 lines
283 B
Ruby
require "spec_helper"
|
|
|
|
describe Photo, type: :model do
|
|
it { should have_and_belong_to_many(:categories) }
|
|
|
|
it { should validate_presence_of(:image) }
|
|
|
|
let(:photo) { create(:photo) }
|
|
|
|
it "logs a view" do
|
|
expect { photo.log_view }.to change { photo.views }.by(1)
|
|
end
|
|
end
|