Module: BeyondTheApiTestHelpers::Request::ShowAssertions

Defined in:
lib/beyond_the_api_test_helpers/request/show_assertions.rb

Instance Method Summary collapse

Instance Method Details

#assert_request_show_not_found(urls_not_found, options = {}) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/beyond_the_api_test_helpers/request/show_assertions.rb', line 17

def assert_request_show_not_found(urls_not_found, options = {})
  request_instance_variables_set options
  @headers.merge!(logged_in_headers) if 

  urls_not_found.each do |url_not_found|
    assert_request_show_not_found_i18n_all(url_not_found)
  end
end

#assert_request_show_valid(url, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/beyond_the_api_test_helpers/request/show_assertions.rb', line 4

def assert_request_show_valid(url, options = {})
  request_instance_variables_set options

  if 
    assert_request_needs_to_be_logged(url, :get)
    @headers.merge!(logged_in_headers)
  end

  get(url, params: @params, headers: @headers)
  response_assertions(status: 200)
  assert_kind_of Hash, json_response_name
end