Sha256: 1d0df81d7c6f27a8b4c82fd6f86e110ee60a3a676977ad418d9f04e78c374833

Contents?: true

Size: 804 Bytes

Versions: 13

Compression:

Stored size: 804 Bytes

Contents

When /^I send an "([^\"]*)" header of "([^\"]*)"$/ do |key, value|
  @request_headers ||= {}
  @request_headers[key] = value
end

When /^I go to ['"](.*)['"]$/ do |url|
  set_headers
  visit url
end

When /^I view a page$/ do
  visit "/admin/pages/#{pages(:home).id}"
end

When /^I view a snippet$/ do
  visit "/admin/snippets/#{snippets(:first).id}"
end

When /^I view a layout$/ do
  visit "/admin/layouts/#{layouts(:main).id}"
end

When /^I view a user$/ do
  visit "/admin/users/#{users(:admin).id}"
end

When /^I request the children of page "([^\"]*)"$/ do |page|
  parent_page = pages(page.intern)
  set_headers
  visit "/admin/pages/#{parent_page.id}/children", :get, {"level" => "0"}
end

def set_headers
  @request_headers.each do |k,v|
    header(k, v)
  end unless @request_headers.blank?
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.2.2 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.2.1 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.2 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.1.9 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.1.8 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.1.7 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.1.6 features/step_definitions/admin/content_negotiation_steps.rb
radiantcms-couchrest_model-0.1.5 features/step_definitions/admin/content_negotiation_steps.rb
radiant-0.8.2 features/step_definitions/admin/content_negotiation_steps.rb
radiant-rc-0.9.0 features/step_definitions/admin/content_negotiation_steps.rb
radiant-0.8.1 features/step_definitions/admin/content_negotiation_steps.rb
radiant-0.8.0 features/step_definitions/admin/content_negotiation_steps.rb