Spec-Zone.ru › Ruby on Rails 5.2

модуль ActionDispatch::Integration::RequestHelpers

Публичные методы экземпляров

delete(path, **args) Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 41
def delete(path, **args)
  process(:delete, path, **args)
end

Выполняет запрос DELETE с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.

follow_redirect!() Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 54
def follow_redirect!
  raise "not a redirect! #{status} #{status_message}" unless redirect?
  get(response.location)
  status
end

Выполняет переадресацию по одному ответу. Если последний ответ не был переадресацией, будет возбуждено исключение. В противном случае переадресация выполняется по заголовку location.

get(path, **args) Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 17
def get(path, **args)
  process(:get, path, **args)
end

Выполняет запрос GET с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.

head(path, *args) Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 47
def head(path, *args)
  process(:head, path, *args)
end

Выполняет запрос HEAD с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.

patch(path, **args) Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 29
def patch(path, **args)
  process(:patch, path, **args)
end

Выполняет запрос PATCH с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.

post(path, **args) Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 23
def post(path, **args)
  process(:post, path, **args)
end

Выполняет запрос POST с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.

put(path, **args) Показать исходный код
# File actionpack/lib/action_dispatch/testing/integration.rb, line 35
def put(path, **args)
  process(:put, path, **args)
end

Выполняет запрос PUT с заданными параметрами. Подробнее см. ActionDispatch::Integration::Session#process.

© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API