Sha256: 733496224901694be9af5e0ec309fad09080a077dc2f871a63173c2301f8fbb5

Contents?: true

Size: 919 Bytes

Versions: 1

Compression:

Stored size: 919 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "Browse files" do

  describe "when not logged in" do
    it "should let us browse some of the fixtures" do
      visit '/'
      click_link "more Keywords"
      click_link "test"
      # TODO this used to be 1 - 4 of 4, but now we get 5. WTF?
      # It looks to me like sufia:sufia1, sufia:test3,  sufia:test4,  sufia:test5, sufia:test6 all should match
      page.should have_content "1 - 5 of 5"
      click_link "Test Document PDF"
      page.should have_content "Download"
      page.should_not have_content "Edit"
    end

  end

  describe "when logged in" do
    before do
      sign_in :user
    end
    it "should let us browse some of the fixtures and see the edit link"do
      click_link "more Keywords"
      click_link "test"
      click_link "Test Document PDF"
      page.should_not have_content "Edit"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sufia-3.0.0 spec/features/browse_files.rb