This is the error when i run the capybara test:
Failure/Error:
respond_to do |format|
#format.html
format.js
end
ActionController::UnknownFormat:
ActionController::UnknownFormat
This is from the controller file: (uncommenting format.html didn't work)
def new
@location = @provider.locations.new
@address = @location.build_address
@addresses = []
respond_to do |format|
#format.html
format.js
end
This is the capybara code
describe "this tab" do
it "shows data" do
visit locations_profile_path(@provider)
expect(current_path).to eq("/profile/#{@provider.id}/locations")
expect(page).to have_content("All Practice Locations")
expect(page).to have_content('Add New Location')
Capybara.default_max_wait_time = 20
click_on 'Add New Location'
end
end