Sha256: 6754559496083239636ef3b1934bb09ffc5e7561e9c2926e7e10ebc974a4257a

Contents?: true

Size: 1.33 KB

Versions: 3

Compression:

Stored size: 1.33 KB

Contents

require 'spec_helper'

describe "User Profile" do

  before do
    sign_in :curator
  end

  it "should be displayed" do
    click_link "curator1@example.com"
    page.should have_content "Edit Your Profile"
  end

  it "should be editable" do
    click_link "curator1@example.com"
    click_link "Edit Your Profile"
    page.should have_xpath("//form[@action='/users/curator1@example-dot-com']")
    fill_in 'user_twitter_handle', with: 'curatorOfData'
    click_button 'Save Profile'
    page.should have_content "Your profile has been updated"
    page.should have_content "curatorOfData"
  end

  it "should display all users" do
    click_link "curator1@example.com"
    click_link "View Users"
    page.should have_xpath("//td/a[@href='/users/curator1@example-dot-com']")
  end

  it "should be searchable" do
    @archivist = FactoryGirl.find_or_create(:archivist)
    click_link "curator1@example.com"
    click_link "View Users"
    page.should have_xpath("//td/a[@href='/users/curator1@example-dot-com']")
    page.should have_xpath("//td/a[@href='/users/archivist1@example-dot-com']")
    fill_in 'user_search', with: 'archivist1@example.com'
    click_button "user_submit"
    page.should_not have_xpath("//td/a[@href='/users/curator1@example-dot-com']")
    page.should have_xpath("//td/a[@href='/users/archivist1@example-dot-com']")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sufia-4.0.0.beta2 spec/features/users_spec.rb
sufia-4.0.0.beta1 spec/features/users_spec.rb
sufia-3.7.2 spec/features/users_spec.rb