Sha256: b77229636736cf8476d0532bfaa50dadbeefa58a0d39b7dead1ddc22fec67984
Contents?: true
Size: 1011 Bytes
Versions: 5
Compression:
Stored size: 1011 Bytes
Contents
require 'spec_helper' describe 'searching' do before { GenericFile.destroy_all } let!(:file) { FactoryGirl.create(:public_file, title: "Toothbrush") } context "as a public user" do it "should find the file and have a gallery" do visit '/' fill_in "search-field-header", with: "Toothbrush" click_button "search-submit-header" expect(page).to have_content "1 entry found" within "#search-results" do expect(page).to have_content "Toothbrush" end click_link "Gallery" expect(page).to have_content "You searched for: Toothbrush" within "#documents" do expect(page).to have_content "Toothbrush" end end it "should not display search options for dashboard files" do visit "/" within(".input-group-btn") do expect(page).to_not have_content("My Files") expect(page).to_not have_content("My Collections") expect(page).to_not have_content("My Shares") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems