Trying to work with javascript in a simple function specification, but I canβt even visit the page.
describe "DiskFiles" do ... describe "update action", js: true do before(:each) do df = FactoryGirl.create(:disk_file) visit edit_disk_file_path(df) end it "should not show checkmark if no match" do expect(page).to_not have_content "β" end end end
I get this error:
1) DiskFiles update action should not show checkmark if no match Failure/Error: Unable to find matching line from backtrace ActiveRecord::RecordNotFound: Couldn't find DiskFile with id=7598 [WHERE "disk_items"."type" IN ('DiskFile')] # ./app/controllers/disk_files_controller.rb:89:in `set_disk_file'
Which confuses me, because I just created this entry in before(:each) and it passes when I delete js: true .
What am I missing?
source share