Sha256: 7ee719343f695d46525a8b468e0535015afd0420406a32d4ccdfe60704fd5e9d

Contents?: true

Size: 1004 Bytes

Versions: 11

Compression:

Stored size: 1004 Bytes

Contents

require 'spec_helper'

describe "Editing a record" do
  it "" do
    login_as('archivist1@example.com', 'test123')
  end
  it "Can edit basic content" do
    register_and_login_as('archivist1@example.com')

    visit new_record_path

    fill_in "Title", :with => "This is my record title"
    fill_in "Abstract", :with => "Abstract!"
    click_button "save"

    page.should have_content("This is my record title")
  end
end

def logout
  visit destroy_user_session_path
end

def login_as(email, password)
  logout

  visit new_user_session_path
  fill_in "Email", :with => email 
  fill_in "Password", :with => password
  click_button "Sign in"
end

def register email, password
  visit "/users/sign_up"

  fill_in "Email",                 :with => email
  fill_in "Password",              :with => password
  fill_in "Password confirmation", :with => password

  click_button "Sign up"
end

def register_and_login_as email, password='test123'
  register email, password
  login_as email, password
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hydra-tutorial-0.2.1 templates/integration_spec.rb
hydra-tutorial-0.2.0 templates/integration_spec.rb
hydra-tutorial-0.1.3 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.1.2 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.1.0 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.0.9 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.0.8 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.0.7 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.0.6 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.0.5 or_templates/add_tests/integration_spec.rb
hydra-tutorial-0.0.4 or_templates/add_tests/integration_spec.rb