Sha256: a3f0d0b26d6596a02e74017976911d3e9881df2ca658851ca81bfe4005153193

Contents?: true

Size: 799 Bytes

Versions: 7

Compression:

Stored size: 799 Bytes

Contents

# -*- encoding : utf-8 -*-
Given /^I am logged in as "([^\"]*)"$/ do |login|
  email = "#{login}@#{login}.com"
  user = User.create(:login => login, :email => email, :password => "password", :password_confirmation => "password")
#  visit user_sessions_path(:user_session => {:login => login, :password => "password"}), :post
#  User.find(user.id).should_not be_nil
  visit new_user_session_path
  fill_in("user_email", :with => email) 
  fill_in("user_password", :with => "password") 
  click_button("Sign in")
#  response.body.should =~ /Logged/m  
  Then 'I should see "Log Out"'
end

Given /^"([^\"]*)" has saved a search with term "([^\"]*)"$/ do |user, term|
  user = User.find_by_email("#{user}@#{user}.com")
  user.searches << Search.create(:query_params => {:q => term})
  user.save!
end



Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
atrium-0.0.1 test_support/features/step_definitions/saved_searches_steps.rb
atrium-0.0.1.alpha test_support/features/step_definitions/saved_searches_steps.rb
blacklight-3.1.2 test_support/features/step_definitions/saved_searches_steps.rb
blacklight-3.1.1 test_support/features/step_definitions/saved_searches_steps.rb
blacklight-3.1.0 test_support/features/step_definitions/saved_searches_steps.rb
blacklight-3.0.0 test_support/features/step_definitions/saved_searches_steps.rb
blacklight-3.0.0pre8 test_support/features/step_definitions/saved_searches_steps.rb