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