1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
danbarberphoto/spec/models/photo_spec.rb
2015-10-29 17:15:10 +00:00

12 lines
223 B
Ruby

require 'spec_helper'
describe Photo do
it { should have_and_belong_to_many(:categories) }
let(:photo) { create(:photo) }
it 'logs a view' do
expect { photo.log_view }.to change { photo.views }.by(1)
end
end