Sha256: d31c691ec4626414a7c46336ba471ffc474aa1748ea3464a4b1881f0d7f3be31
Contents?: true
Size: 1.25 KB
Versions: 5
Compression:
Stored size: 1.25 KB
Contents
# frozen_string_literal: true require 'spec_helper' describe "Saved Searches" do before do sign_in 'user1' visit root_path end it "should be empty" do click_link 'Saved Searches' expect(page).to have_content 'You have no saved searches' end describe "with a saved search 'book'" do before do fill_in "q", with: 'book' click_button 'search' click_link "History" click_button "save" click_link 'Saved Searches' end it "should show saved searches" do expect(page).to have_content 'Your saved searches' expect(page).to have_content 'book' end it "should delete saved searches" do click_button 'delete' expect(page).to have_content 'Successfully removed that saved search.' end describe "and a saved search 'dang'" do before do visit root_path fill_in "q", with: 'dang' click_button 'search' click_link "History" click_button "save" click_link 'Saved Searches' end it "should clear the searhes" do click_link "Clear Saved Searches" expect(page).to have_content 'Cleared your saved searches.' expect(page).to have_content 'You have no saved searches' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems