<commit_before>require 'test_helper'
require 'gds_api/support'

describe GdsApi::Support do
  before do
    @base_api_url = Plek.current.find("support")
    @api = GdsApi::Support.new(@base_api_url)
  end

  it "can create an asset with a file" do
    request_details = {"foi_request"=>{"requester"=>{"name"=>"A", "email"=>"<EMAIL>"}, "details"=>"abc"}}

    stub_request(:post, "#{@base_api_url}/foi_requests").
      with(:body => {"foi_request" => request_details}.to_json).
      to_return(:status => 201)

    @api.create_foi_request(request_details)
  end
end<commit_msg>add missing assertion to support API test<commit_after>require 'test_helper'
require 'gds_api/support'

describe GdsApi::Support do
  before do
    @base_api_url = Plek.current.find("support")
    @api = GdsApi::Support.new(@base_api_url)
  end

  it "can create an asset with a file" do
    request_details = {"foi_request"=>{"requester"=>{"name"=>"A", "email"=>"<EMAIL>"}, "details"=>"abc"}}

    stub_post = stub_request(:post, "#{@base_api_url}/foi_requests").
      with(:body => {"foi_request" => request_details}.to_json).
      to_return(:status => 201)

    @api.create_foi_request(request_details)

    assert_requested(stub_post)
  end
end
{'fraction_non_alphanumeric': 0.16381418092909536, 'fraction_numerical': 0.004889975550122249, 'mean_word_length': 4.990243902439024, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3795176', 'n_tokens_mistral': 452, 'n_tokens_neox': 438, 'n_words': 81}