mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 03:09:06 -04:00
'.= f.submit' is not valid Haml, so the page raised a syntax error. Add a request spec that renders it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
29 lines
701 B
Ruby
29 lines
701 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe "Photos" do
|
|
include Devise::Test::IntegrationHelpers
|
|
|
|
describe "GET /photos/:id/edit" do
|
|
let(:photo) { create(:photo) }
|
|
|
|
it "shows the owner a form to save changes to their photo" do
|
|
sign_in photo.owner
|
|
|
|
get edit_photo_path(photo)
|
|
|
|
expect(response).to have_http_status(:ok)
|
|
expect(Capybara.string(response.body)).to have_button('Save')
|
|
end
|
|
end
|
|
|
|
describe "GET /photos" do
|
|
it "works! (now write some real specs)" do
|
|
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
|
|
get photos_path
|
|
response.status.should be(200)
|
|
end
|
|
end
|
|
end
|