mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
20 lines
389 B
Ruby
20 lines
389 B
Ruby
require 'spec_helper'
|
|
|
|
describe PhotosController do
|
|
describe "GET index" do
|
|
it "renders the index template" do
|
|
get :index
|
|
expect(response).to render_template(:index)
|
|
end
|
|
end
|
|
|
|
describe "GET log_view" do
|
|
let(:photo) { create(:photo) }
|
|
|
|
it "logs a photo view" do
|
|
photo.should_receive(:log_view).once
|
|
get :log_view, id: photo.id
|
|
end
|
|
end
|
|
end
|