source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/parsers/reference_data_response_parser_spec.rb | Ruby | mit | 19 | main | 4,142 | require "rails_helper"
module CCMS
module Parsers
RSpec.describe ReferenceDataResponseParser, :ccms do
let(:expected_tx_id) { "20190301030405123456" }
let(:expected_reference_number) { "300000135140" }
context "when the response is successful" do
let(:response_xml) { ccms_data_from_fil... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/parsers/case_add_status_response_parser_spec.rb | Ruby | mit | 19 | main | 2,960 | require "rails_helper"
module CCMS
module Parsers
RSpec.describe CaseAddStatusResponseParser, :ccms do
context "when the response is successful" do
describe "#success?" do
let(:expected_tx_id) { "20190301030405123456" }
describe "normal success response" do
let(:res... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/parsers/applicant_search_response_parser_spec.rb | Ruby | mit | 19 | main | 10,946 | require "rails_helper"
module CCMS
module Parsers
RSpec.describe ApplicantSearchResponseParser, :ccms do
describe "parsing applicant search responses" do
let(:no_results_response_xml) { ccms_data_from_file "applicant_search_response_no_results.xml" }
let(:parser) { described_class.new(Faker... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/parsers/applicant_add_status_response_parser_spec.rb | Ruby | mit | 19 | main | 1,653 | require "rails_helper"
module CCMS
module Parsers
RSpec.describe ApplicantAddStatusResponseParser, :ccms do
let(:response_xml) { ccms_data_from_file "applicant_add_status_response.xml" }
let(:expected_tx_id) { "20190301030405123456" }
let(:expected_applicant_ccms_reference) { "20910584" }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/applicant_add_requestor_spec.rb | Ruby | mit | 19 | main | 6,659 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe ApplicantAddRequestor, :ccms do
let(:expected_xml) { ccms_data_from_file "applicant_add_request.xml" }
let(:expected_tx_id) { "20190101121530000000" }
let(:last_name_at_birth) { nil }
let(:address) do
create(:addr... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/document_upload_requestor_spec.rb | Ruby | mit | 19 | main | 8,821 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe DocumentUploadRequestor, :ccms do
let(:expected_xml) { ccms_data_from_file "document_upload_request.xml" }
let(:expected_tx_id) { "20190101121530000000" }
let(:case_ccms_reference) { "1234567890" }
let(:document_id) { "442... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/applicant_add_status_requestor_spec.rb | Ruby | mit | 19 | main | 1,685 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe ApplicantAddStatusRequestor, :ccms do
let(:expected_xml) { ccms_data_from_file "applicant_add_status_request.xml" }
let(:expected_tx_id) { "20190101121530000000" }
let(:requestor) { described_class.new(expected_tx_id, "my_login... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/reference_data_requestor_spec.rb | Ruby | mit | 19 | main | 1,656 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe ReferenceDataRequestor, :ccms do
let(:expected_xml) { ccms_data_from_file "reference_data_request.xml" }
let(:expected_tx_id) { "20190101121530000000" }
let(:requestor) { described_class.new("my_login") }
describe "XML r... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_status_requestor_spec.rb | Ruby | mit | 19 | main | 1,582 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe CaseAddStatusRequestor, :ccms do
let(:expected_xml) { ccms_data_from_file "case_add_status_request.xml" }
let(:expected_tx_id) { "20190101121530000000" }
let(:requestor) { described_class.new(expected_tx_id, "my_login") }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_spec.rb | Ruby | mit | 19 | main | 26,237 | require "rails_helper"
# DO NOT EXTEND this spec
# Use the spec/ccms/requestors/case_add_requestor_xml_blocks
# directory and subfiles.
#
module CCMS
module Requestors
RSpec.describe CaseAddRequestor, :ccms do
describe "#call" do
let(:expected_tx_id) { "202011241154290000006983477" }
let(:... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/special_children_act_case_add_requestor_spec.rb | Ruby | mit | 19 | main | 23,850 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe SpecialChildrenActCaseAddRequestor, :ccms do
describe "#call" do
let(:expected_tx_id) { "202011241154290000006983477" }
let(:legal_aid_application) do
create(:legal_aid_application,
:with_sca_sta... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/applicant_search_requestor_spec.rb | Ruby | mit | 19 | main | 2,808 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe ApplicantSearchRequestor, :ccms do
let(:expected_tx_id) { "20190101121530000000" }
let(:applicant) do
create(:applicant,
first_name: "lenovo",
last_name: "hurlock",
date_of_birth: ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/document_id_requestor_spec.rb | Ruby | mit | 19 | main | 7,374 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe DocumentIdRequestor, :ccms do
let(:expected_xml) { ccms_data_from_file "document_id_request.xml" }
let(:expected_tx_id) { "20190101121530000000" }
let(:case_ccms_reference) { "1234567890" }
let(:requestor) { described_cla... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_additional_property_attributes_spec.rb | Ruby | mit | 19 | main | 11,133 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonPassportedCaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:firm) { create(:firm, name: "Firm1") }
let(:office) { create(:office, firm:) }
le... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_dependant_child_attributes_spec.rb | Ruby | mit | 19 | main | 14,123 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonPassportedCaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:firm) { create(:firm, name: "Firm1") }
let(:office) { create(:office, firm:) }
le... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_chances_of_success_attributes_spec.rb | Ruby | mit | 19 | main | 9,780 | require "rails_helper"
RSpec.shared_examples "FAM_PROSP_X attribute omitter" do
it "does not generate any of the attribute chances of success blocks" do
xml = request_xml
chances_of_success_attributes.each do |attr_name|
block = XmlExtractor.call(xml, :proceeding_merits, attr_name)
expect(block)... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/passported_attributes_spec.rb | Ruby | mit | 19 | main | 81,646 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe CaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:firm) { create(:firm, name: "Firm1") }
let(:office) { create(:office, firm:) }
let(:provider) ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_means_tested_attributes_spec.rb | Ruby | mit | 19 | main | 59,165 | # see sheet for description of attributes
# https://docs.google.com/spreadsheets/d/1hftRRmxBPcyll-akFbiCZgizdsr4uoMZnIaNKod9_lc/edit#gid=1199948510
#
require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonMeansTestedCaseAddRequestor, :ccms do
context "with XML request" do
let(:reque... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_variable_attributes_spec.rb | Ruby | mit | 19 | main | 34,587 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonPassportedCaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:firm) { create(:firm, name: "Firm1") }
let(:office) { create(:office, firm:) }
le... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_entities_spec.rb | Ruby | mit | 19 | main | 21,221 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonPassportedCaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:proceeding_type) { create(:proceeding_type, :with_real_data) }
let(:firm) { create(:firm,... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_attributes_spec.rb | Ruby | mit | 19 | main | 41,748 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonPassportedCaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:firm) { create(:firm, name: "Firm1") }
let(:office) { create(:office, firm:) }
le... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/requestors/case_add_requestor_xml_blocks/non_passported_benefits_attrs_spec.rb | Ruby | mit | 19 | main | 3,354 | require "rails_helper"
module CCMS
module Requestors
RSpec.describe NonPassportedCaseAddRequestor, :ccms do
describe "XML request" do
let(:expected_tx_id) { "201904011604570390059770666" }
let(:proceeding_type) { legal_aid_application.application_proceeding_types.first.proceeding_type }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/payload_generators/entity_attributes_generator_spec.rb | Ruby | mit | 19 | main | 3,657 | require "rails_helper"
module CCMS
module PayloadGenerators
RSpec.describe EntityAttributesGenerator, :ccms do
let(:generator) { described_class.new(requestor, xml, entity_name, options) }
let(:requestor) { instance_double CCMS::Requestors::CaseAddRequestor, submission:, ccms_attribute_keys: yaml_key... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/payload_generators/other_party_attribute_generator_spec.rb | Ruby | mit | 19 | main | 5,185 | require "rails_helper"
module CCMS
module PayloadGenerators
RSpec.describe OtherPartyAttributeGenerator, :ccms do
let(:namespaces) { CCMS::Requestors::BaseRequestor::NAMESPACES }
let(:other_party_xpath) { "//casebio:OtherParties/casebio:OtherParty" }
describe ".call" do
subject(:call) ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/obtain_case_reference_service_spec.rb | Ruby | mit | 19 | main | 3,734 | require "rails_helper"
module CCMS
module Submitters
RSpec.describe ObtainCaseReferenceService, :ccms do
subject(:obtain_case_reference_service) { described_class.new(submission) }
let(:legal_aid_application) { create(:legal_aid_application, :with_merits_submitted) }
let(:submission) { create(... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/check_applicant_status_service_spec.rb | Ruby | mit | 19 | main | 6,794 | require "rails_helper"
module CCMS
module Submitters
RSpec.describe CheckApplicantStatusService, :ccms do
subject(:instance) { described_class.new(submission) }
let(:submission) { create(:submission, :applicant_submitted) }
let(:history) { SubmissionHistory.find_by(submission_id: submission.id... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/obtain_applicant_reference_service_spec.rb | Ruby | mit | 19 | main | 8,113 | require "rails_helper"
module CCMS
module Submitters
RSpec.describe ObtainApplicantReferenceService, :ccms do
subject(:instance) { described_class.new(submission) }
let(:legal_aid_application) { create(:legal_aid_application, :with_proceedings, :with_everything_and_address, :with_merits_submitted, a... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/add_applicant_service_spec.rb | Ruby | mit | 19 | main | 7,561 | require "rails_helper"
module CCMS
module Submitters
RSpec.describe AddApplicantService, :ccms do
subject(:instance) { described_class.new(submission) }
let(:legal_aid_application) { create(:legal_aid_application, :with_applicant_and_address, :with_merits_submitted) }
let(:applicant) { legal_a... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/upload_documents_service_spec.rb | Ruby | mit | 19 | main | 7,103 | require "rails_helper"
RSpec.describe CCMS::Submitters::UploadDocumentsService, :ccms do
subject(:instance) { described_class.new(submission) }
before do
create(:submission_document, :id_obtained, submission:, attachment_id: statement_of_case_attachment.id)
create(:submission_document, :id_obtained, submi... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/obtain_document_id_service_spec.rb | Ruby | mit | 19 | main | 11,031 | require "rails_helper"
module CCMS
module Submitters
RSpec.describe ObtainDocumentIdService, :ccms do
subject(:instance) { described_class.new(submission) }
let(:legal_aid_application) do
create(:legal_aid_application,
:with_applicant,
:with_proceedings,
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/check_case_status_service_spec.rb | Ruby | mit | 19 | main | 8,394 | require "rails_helper"
RSpec.describe CCMS::Submitters::CheckCaseStatusService, :ccms do
subject(:check_case_status_service) { described_class.new(submission) }
let(:submission) { create(:submission, :case_submitted) }
let(:case_add_status_requestor) { instance_double CCMS::Requestors::CaseAddStatusRequestor }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/ccms/submitters/add_case_service_spec.rb | Ruby | mit | 19 | main | 9,758 | require "rails_helper"
module CCMS
module Submitters
RSpec.describe AddCaseService, :ccms do
subject(:instance) { described_class.new(submission) }
let(:legal_aid_application) do
create(:legal_aid_application,
:with_proceedings,
:with_parties_mental_capacity,
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/merits_tasks_retriever_service_spec.rb | Ruby | mit | 19 | main | 2,876 | require "rails_helper"
module LegalFramework
RSpec.describe MeritsTasksRetrieverService do
let(:application) { create(:legal_aid_application, :with_proceedings) }
let(:submission) { create(:legal_framework_submission, legal_aid_application: application) }
let(:dummy_response) { dummy_response_hash.to_jso... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/add_opponent_organisation_service_spec.rb | Ruby | mit | 19 | main | 1,784 | require "rails_helper"
module LegalFramework
RSpec.describe AddOpponentOrganisationService, :vcr do
subject(:instance) { described_class.new(legal_aid_application) }
let(:legal_aid_application) { create(:legal_aid_application) }
describe "#call" do
context "with a duck" do
let(:duck_type)... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/add_proceeding_service_spec.rb | Ruby | mit | 19 | main | 2,977 | require "rails_helper"
module LegalFramework
RSpec.describe AddProceedingService, :vcr do
subject(:add_proceeding_service) { described_class.new(legal_aid_application) }
let(:legal_aid_application) { create(:legal_aid_application, :with_applicant) }
let(:ccms_code) { "DA004" }
describe "#call" do
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/merits_tasks_service_spec.rb | Ruby | mit | 19 | main | 4,461 | require "rails_helper"
module LegalFramework
RSpec.describe MeritsTasksService do
let(:application) { create(:legal_aid_application, :with_proceedings) }
let(:service) { described_class.call(application) }
let(:submission) { create(:legal_framework_submission) }
before do
instance_double(Merit... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/opponent_task_update_service_spec.rb | Ruby | mit | 19 | main | 1,780 | require "rails_helper"
module LegalFramework
RSpec.describe OpponentTaskUpdateService do
subject(:call_service) { described_class.call(legal_aid_application) }
let(:legal_aid_application) { create(:legal_aid_application, :with_multiple_proceedings_inc_section8) }
context "when the task list predates th... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/lead_proceeding_assignment_service_spec.rb | Ruby | mit | 19 | main | 1,956 | require "rails_helper"
module LegalFramework
RSpec.describe LeadProceedingAssignmentService do
subject(:lead_proceeding_assignment) { described_class.call(laa) }
let(:p_da1) { laa.proceedings.where(ccms_code: "DA001").first }
let(:p_da2) { laa.proceedings.where(ccms_code: "DA004").first }
let(:p_s81... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/organisation_types/all_spec.rb | Ruby | mit | 19 | main | 502 | require "rails_helper"
RSpec.describe LegalFramework::OrganisationTypes::All, :vcr do
subject(:all) { described_class }
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/organisation_types/all" }
describe ".call" do
subject(:call) { all.call }
before { call }
it "makes one external c... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/proceeding_types/proceeding_spec.rb | Ruby | mit | 19 | main | 3,482 | require "rails_helper"
RSpec.describe LegalFramework::ProceedingTypes::Proceeding, :vcr do
subject(:proceeding) { described_class }
let(:ccms_code) { "DA004" }
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/proceeding_types/#{ccms_code}" }
describe ".call" do
subject(:call) { proceeding.c... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/proceeding_types/scopes_spec.rb | Ruby | mit | 19 | main | 8,435 | require "rails_helper"
RSpec.describe LegalFramework::ProceedingTypes::Scopes, :vcr do
subject(:scopes) { described_class }
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/proceeding_types_scopes" }
describe ".call" do
subject(:call) { scopes.call(proceeding, emergency) }
before { call ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/proceeding_types/all_spec.rb | Ruby | mit | 19 | main | 4,305 | require "rails_helper"
RSpec.describe LegalFramework::ProceedingTypes::All do
subject(:all) { described_class.new(legal_aid_application) }
before do
stub_request(:post, uri).to_return(body:)
end
let(:legal_aid_application) { create :legal_aid_application }
let(:body) { all_proceeding_types_payload }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/proceeding_types/defaults_spec.rb | Ruby | mit | 19 | main | 1,446 | require "rails_helper"
RSpec.describe LegalFramework::ProceedingTypes::Defaults, :vcr do
subject(:defaults) { described_class }
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/proceeding_types_defaults" }
describe ".call" do
subject(:call) { defaults.call(proceeding, false) }
before { c... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/client_involvement_types/proceeding_spec.rb | Ruby | mit | 19 | main | 925 | require "rails_helper"
RSpec.describe LegalFramework::ClientInvolvementTypes::Proceeding, vcr: { cassette_name: "lfa_client_involvement_types_proceeding" } do
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/client_involvement_types/#{proceeding}" }
let(:proceeding) { "DA001" }
describe ".call" do... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/organisations/all_spec.rb | Ruby | mit | 19 | main | 773 | require "rails_helper"
RSpec.describe LegalFramework::Organisations::All, vcr: { cassette_name: "lfa_organisations_all", allow_playback_repeats: true } do
subject(:instance) { described_class }
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/organisation_searches/all" }
describe ".call" do
s... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_framework/non_uk_home_addresses/all_spec.rb | Ruby | mit | 19 | main | 723 | require "rails_helper"
RSpec.describe LegalFramework::NonUkHomeAddresses::All, vcr: { cassette_name: "country_names_all", allow_playback_repeats: true } do
subject(:instance) { described_class }
let(:uri) { "#{Rails.configuration.x.legal_framework_api_host}/countries/all" }
describe ".call" do
subject(:cal... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/api_client_spec.rb | Ruby | mit | 19 | main | 1,607 | require "rails_helper"
RSpec.describe TrueLayer::ApiClient do
subject(:api_client) { described_class.new(token) }
let(:token) { SecureRandom.hex }
describe "#provider" do
let(:mock_provider) { TrueLayerHelpers::MOCK_DATA[:provider] }
before do
stub_true_layer_provider
end
it "returns th... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/banks_retriever_spec.rb | Ruby | mit | 19 | main | 1,517 | require "rails_helper"
RSpec.describe TrueLayer::BanksRetriever, vcr: { cassette_name: "true_layer_banks_api", allow_playback_repeats: true } do
subject(:banks_retriever) { described_class.new }
describe ".banks" do
it "returns same as instance banks" do
expect(described_class.banks).to eq(banks_retriev... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/api_client_mock_spec.rb | Ruby | mit | 19 | main | 3,031 | require "rails_helper"
RSpec.describe TrueLayer::ApiClientMock do
subject(:api_client_mock) { described_class.new(SecureRandom.hex) }
describe "#provider" do
it "returns sample data" do
expect(api_client_mock.provider.value).to eq(TrueLayer::SampleData::PROVIDERS)
end
end
describe "#account_hol... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/bank_data_import_service_spec.rb | Ruby | mit | 19 | main | 4,170 | require "rails_helper"
RSpec.describe TrueLayer::BankDataImportService do
let(:legal_aid_application) do
create(
:legal_aid_application,
:with_transaction_period,
applicant:,
)
end
let(:applicant) { build(:applicant, :with_encrypted_true_layer_token) }
let(:mock_data) { TrueLayerHelp... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/importers/import_transactions_service_spec.rb | Ruby | mit | 19 | main | 3,779 | require "rails_helper"
RSpec.describe TrueLayer::Importers::ImportTransactionsService do
let(:mock_account) { TrueLayerHelpers::MOCK_DATA[:accounts].first }
let(:bank_account) { create(:bank_account, true_layer_id: mock_account[:account_id]) }
let(:api_client) { TrueLayer::ApiClient.new(SecureRandom.hex) }
de... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/importers/import_account_holders_service_spec.rb | Ruby | mit | 19 | main | 2,181 | require "rails_helper"
RSpec.describe TrueLayer::Importers::ImportAccountHoldersService do
let(:bank_provider) { create(:bank_provider) }
let(:api_client) { TrueLayer::ApiClient.new(SecureRandom.hex) }
describe "#call" do
subject(:call) { described_class.call(api_client, bank_provider) }
let(:mock_acco... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/importers/import_provider_service_spec.rb | Ruby | mit | 19 | main | 2,982 | require "rails_helper"
RSpec.describe TrueLayer::Importers::ImportProviderService do
let(:api_client) { TrueLayer::ApiClient.new(SecureRandom.hex) }
let(:applicant) { create(:applicant, :with_encrypted_true_layer_token) }
let(:mock_provider) { TrueLayerHelpers::MOCK_DATA[:provider] }
let(:bank_provider) { appl... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/importers/import_account_balance_service_spec.rb | Ruby | mit | 19 | main | 1,222 | require "rails_helper"
RSpec.describe TrueLayer::Importers::ImportAccountBalanceService do
let(:mock_account) { TrueLayerHelpers::MOCK_DATA[:accounts].first }
let(:mock_result) { mock_account[:balance] }
let(:bank_account) { create(:bank_account, true_layer_id: mock_account[:account_id]) }
let(:api_client) { T... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/true_layer/importers/import_accounts_service_spec.rb | Ruby | mit | 19 | main | 2,536 | require "rails_helper"
RSpec.describe TrueLayer::Importers::ImportAccountsService do
let(:bank_provider) { create(:bank_provider) }
let(:api_client) { TrueLayer::ApiClient.new(SecureRandom.hex) }
describe "#call" do
subject(:call) { described_class.call(api_client, bank_provider) }
let(:mock_account1) ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/copy_case/cloner_service_spec.rb | Ruby | mit | 19 | main | 10,920 | require "rails_helper"
RSpec.describe CopyCase::ClonerService do
subject(:instance) { described_class.new(target, source) }
let(:target) { create(:legal_aid_application, :with_applicant) }
let(:source) do
create(:legal_aid_application,
:with_proceedings,
:with_everything,
:w... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/govuk_emails/monitor_spec.rb | Ruby | mit | 19 | main | 7,729 | require "rails_helper"
RSpec.describe GovukEmails::Monitor do
before do
allow(GovukEmails::Email).to receive(:new).with(scheduled_mailing.govuk_message_id).and_return(response)
Setting.setting.update!(alert_via_sentry: true)
end
let(:response) { instance_double(GovukEmails::Email, status:) }
describe... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/govuk_emails/email_spec.rb | Ruby | mit | 19 | main | 1,685 | require "rails_helper"
StatusStruct = Struct.new(:status)
RSpec.describe GovukEmails::Email do
subject { described_class.new(message_id) }
let(:govuk_client) { instance_double(Notifications::Client) }
let(:message_id) { "ad9559be-f32d-4674-91dd-87c50d4a16b2" }
before do
allow(govuk_client).to receive(:g... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/govuk_emails/delivery_man_spec.rb | Ruby | mit | 19 | main | 4,846 | require "rails_helper"
ErrorResponseStruct = Struct.new(:code, :body)
RSpec.describe GovukEmails::DeliveryMan do
subject(:delivery_man) { described_class.call(scheduled_mailing.id) }
let(:scheduled_mailing) { create(:scheduled_mailing, :waiting) }
let(:mailer_klass) { scheduled_mailing.mailer_klass }
let(:ma... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/legal_aid_applications/calculation_date_service_spec.rb | Ruby | mit | 19 | main | 2,917 | require "rails_helper"
RSpec.describe LegalAidApplications::CalculationDateService do
subject(:call) { described_class.call(legal_aid_application) }
let(:merits_submitted_at) { Date.current }
let(:applicant_receives_benefit) { true }
let(:benefit_check_result) { build(:benefit_check_result, result: applicant_... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/save_and_continue_service_spec.rb | Ruby | mit | 19 | main | 3,889 | require "rails_helper"
module UploadedEvidence
RSpec.describe SaveAndContinueService do
let(:laa) { create(:legal_aid_application) }
let(:params) { nil }
let(:controller) { instance_double Providers::UploadedEvidenceCollectionsController, params:, legal_aid_application: laa }
describe ".call" do
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/base_spec.rb | Ruby | mit | 19 | main | 1,482 | require "rails_helper"
require_relative "shared_examples_for_uploaded_evidence"
module UploadedEvidence
RSpec.describe Base do
subject(:base_service_call) { described_class.call(controller) }
let(:controller) { instance_double Providers::UploadedEvidenceCollectionsController, params: }
describe ".call" ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/shared_examples_for_uploaded_evidence.rb | Ruby | mit | 19 | main | 2,006 | RSpec.shared_examples "An uploaded evidence service" do
describe "#attachment_type_options" do
let(:legal_aid_application) { create(:legal_aid_application) }
let(:controller) { instance_double Providers::UploadedEvidenceCollectionsController, legal_aid_application: }
# exhaustive but unrealistic example
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/deletion_service_spec.rb | Ruby | mit | 19 | main | 1,594 | require "rails_helper"
require_relative "shared_examples_for_uploaded_evidence"
module UploadedEvidence
RSpec.describe DeletionService do
let(:laa) { create(:legal_aid_application) }
let(:controller) { instance_double Providers::UploadedEvidenceCollectionsController, params:, legal_aid_application: laa }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/populate_upload_form_service_spec.rb | Ruby | mit | 19 | main | 1,628 | require "rails_helper"
require_relative "shared_examples_for_uploaded_evidence"
module UploadedEvidence
RSpec.describe PopulateUploadFormService do
let(:laa) { create(:legal_aid_application) }
let(:params) { nil }
let(:controller) { instance_double Providers::UploadedEvidenceCollectionsController, params... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/draft_service_spec.rb | Ruby | mit | 19 | main | 1,221 | require "rails_helper"
module UploadedEvidence
RSpec.describe DraftService do
let(:laa) { create(:legal_aid_application) }
let(:params) { {} }
let(:controller) { instance_double Providers::UploadedEvidenceCollectionsController, params:, legal_aid_application: laa }
describe ".call" do
let(:se... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/uploaded_evidence/list_service_spec.rb | Ruby | mit | 19 | main | 1,535 | require "rails_helper"
require_relative "shared_examples_for_uploaded_evidence"
module UploadedEvidence
RSpec.describe ListService do
let(:laa) { create(:legal_aid_application) }
let(:params) { nil }
let(:allowed_document_categories) { %w[gateway_evidence employment_evidence] }
let(:expected_attachm... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/faraday/soap_call_spec.rb | Ruby | mit | 19 | main | 4,484 | require "rails_helper"
RSpec.describe Faraday::SoapCall do
subject(:faraday_soap_call) { described_class.new(initial_object, type) }
let(:type) { :ccms }
describe "initializing" do
describe "with a bad attribute" do
let(:initial_object) { "clearly not a url" }
it "raises an error" do
e... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/pdf/convert_file_spec.rb | Ruby | mit | 19 | main | 542 | require "rails_helper"
module PDF
RSpec.describe ConvertFile do
subject(:call) { described_class.call(file) }
before { allow(Libreconv).to receive(:convert) }
describe "#call" do
let(:filepath) { Rails.root.join("spec/fixtures/files/documents/hello_world.pdf").to_s }
let(:file) { File.open(... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/datastore/data_access_api_stubs.rb | Ruby | mit | 19 | main | 2,197 | # Realistic stub at time of wrirting - returns 201 with Location header but no body
def stub_successful_datastore_submission
stub_request(:post, %r{(http|https).*laa-data-access-api.*\.cloud-platform\.service\.justice\.gov\.uk/api/v0/.*})
.to_return(
status: 201,
body: "",
headers: { "locati... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/datastore/connection_spec.rb | Ruby | mit | 19 | main | 431 | require "rails_helper"
RSpec.describe Datastore::Connection do
subject(:instance) { described_class.new }
it { is_expected.to respond_to :post }
describe "#post" do
subject(:post) { instance.post(uri) }
let(:uri) { "/" }
before { allow(instance.connection).to receive(:post) }
it "delegated to... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/datastore/payload_generator_spec.rb | Ruby | mit | 19 | main | 7,146 | require "rails_helper"
RSpec.describe Datastore::PayloadGenerator do
# NOTE: This is an impossible application that should contain every relation it is
# possible to contain so we can exercise the json builders fully.
let(:legal_aid_application) do
create(
:legal_aid_application,
:with_applicant_... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/datastore/persister_spec.rb | Ruby | mit | 19 | main | 1,751 | require "rails_helper"
RSpec.describe Datastore::Persister do
subject(:instance) { described_class.new(legal_aid_application, response:, datastore_id:) }
describe ".call" do
subject(:call) { described_class.call(legal_aid_application, response:, datastore_id:) }
let(:legal_aid_application) { create(:legal... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/datastore/constants_spec.rb | Ruby | mit | 19 | main | 1,071 | require "rails_helper"
RSpec.describe Datastore::Constants do
describe ".status_value" do
subject(:status_value) { described_class.status_value(key) }
it "returns the expected value for :in_progress" do
expect(described_class.status_value(:in_progress)).to eq("APPLICATION_IN_PROGRESS")
end
it ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/datastore/submitter_spec.rb | Ruby | mit | 19 | main | 3,736 | require "rails_helper"
require Rails.root.join("spec/services/datastore/data_access_api_stubs")
RSpec.describe Datastore::Submitter do
let(:uri) { "#{Rails.configuration.x.data_access_api.url}/applications" }
let(:legal_aid_application) { create(:legal_aid_application) }
describe ".call" do
subject(:call) {... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/partner_status_analyzer_spec.rb | Ruby | mit | 19 | main | 3,649 | require "rails_helper"
module HMRC
RSpec.describe PartnerStatusAnalyzer do
describe ".call" do
before do
laa.partner.update!(employed: true) if partner_employed
allow(partner).to receive(:hmrc_responses).and_return(hmrc_response)
end
subject(:service_call) { described_class.cal... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/mock_interface_response_service_spec.rb | Ruby | mit | 19 | main | 12,975 | require "rails_helper"
RSpec.describe HMRC::MockInterfaceResponseService do
subject(:service) { described_class.call(hmrc_response) }
let(:applicant) { create(:applicant) }
let(:application) { create(:legal_aid_application, applicant:) }
let(:owner) { applicant }
let(:hmrc_response) { create(:hmrc_response,... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/status_analyzer_spec.rb | Ruby | mit | 19 | main | 3,311 | require "rails_helper"
module HMRC
RSpec.describe StatusAnalyzer do
describe ".call" do
before do
laa.applicant.update!(employed: true) if applicant_employed
allow(applicant).to receive(:hmrc_responses).and_return(hmrc_response)
end
subject(:service_call) { described_class.call... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/create_responses_service_spec.rb | Ruby | mit | 19 | main | 4,535 | require "rails_helper"
RSpec.describe HMRC::CreateResponsesService do
subject(:create_service) { described_class.new(legal_aid_application) }
let(:legal_aid_application) { create(:legal_aid_application, :with_applicant, :with_transaction_period) }
let(:hmrc_use_dev_mock) { false }
before do
allow(HMRC::M... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/parsed_response/persistor_spec.rb | Ruby | mit | 19 | main | 5,628 | require "rails_helper"
RSpec.describe HMRC::ParsedResponse::Persistor do
subject(:persistor) { described_class.call(hmrc_response) }
let(:application) { create(:legal_aid_application, :with_applicant) }
let(:applicant) { application.applicant }
describe ".call" do
context "with invalid HMRC response" do
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/parsed_response/validator_spec.rb | Ruby | mit | 19 | main | 28,597 | require "rails_helper"
RSpec.describe HMRC::ParsedResponse::Validator do
describe "#call" do
subject(:call) { instance.call }
let(:instance) { described_class.new(hmrc_response, person: applicant) }
let(:applicant) { create(:legal_aid_application, :with_applicant).applicant }
let(:valid_individual_... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/interface/result_service_spec.rb | Ruby | mit | 19 | main | 5,172 | require "rails_helper"
RSpec.describe HMRC::Interface::ResultService do
subject(:submission_result) { described_class.new(hmrc_response) }
let(:legal_aid_application) { create(:legal_aid_application, :with_applicant) }
let(:applicant) { legal_aid_application.applicant }
let(:hmrc_response) { create(:hmrc_resp... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/hmrc/interface/submission_service_spec.rb | Ruby | mit | 19 | main | 4,153 | require "rails_helper"
RSpec.describe HMRC::Interface::SubmissionService do
subject(:interface) { described_class.new(hmrc_response) }
before do
stub_request(:post, %r{(http|https).*laa-hmrc-interface.*\.cloud-platform\.service\.justice\.gov\.uk/oauth/token})
.to_return(
status: 200,
bod... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/merits_loop_spec.rb | Ruby | mit | 19 | main | 1,846 | require "rails_helper"
RSpec.describe Flow::MeritsLoop do
subject(:merits_loop) { described_class.new(legal_aid_application, group) }
let(:legal_aid_application) { create(:legal_aid_application, :with_multiple_proceedings_inc_section8) }
let(:merits_task_list) { create(:legal_framework_merits_task_list, :da001_... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/base_flow_service_spec.rb | Ruby | mit | 19 | main | 3,509 | require "rails_helper"
class TestFlowService < Flow::BaseFlowService; end
RSpec.describe Flow::BaseFlowService do
subject(:base_flow_service) do
flow_service_class.new(
legal_aid_application:,
current_step:,
params:,
)
end
let(:flow_service_class) do
TestFlowService
end
let(:s... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/key_point_spec.rb | Ruby | mit | 19 | main | 1,213 | require "rails_helper"
RSpec.describe Flow::KeyPoint do
subject(:flow_key_point) { described_class.new(journey, key_point) }
let(:journey) { :providers }
let(:key_point) { :start_after_applicant_completes_means }
let(:step) { :client_completed_means }
let(:legal_aid_application) { create(:legal_aid_applicat... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/proceeding_loop_spec.rb | Ruby | mit | 19 | main | 13,942 | require "rails_helper"
RSpec.describe Flow::ProceedingLoop do
subject(:proceeding_loop) { described_class }
describe ".next_step" do
subject(:next_step) { described_class.next_step(legal_aid_application) }
let(:legal_aid_application) do
create(:legal_aid_application,
:with_proceedings,... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/delete_step_spec.rb | Ruby | mit | 19 | main | 350 | require "rails_helper"
RSpec.describe Flow::Steps::DeleteStep, type: :request do
let(:legal_aid_application) { create(:legal_aid_application) }
describe "#path" do
subject(:path) { described_class.path.call(legal_aid_application) }
it { is_expected.to eql providers_legal_aid_application_delete_path(legal... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/providers_home_step_spec.rb | Ruby | mit | 19 | main | 340 | require "rails_helper"
RSpec.describe Flow::Steps::ProvidersHomeStep, type: :request do
let(:legal_aid_application) { create(:legal_aid_application) }
describe "#path" do
subject(:path) { described_class.path.call(legal_aid_application) }
it { is_expected.to eql in_progress_providers_legal_aid_applicatio... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/provider_means_state_benefits/state_benefits_step_spec.rb | Ruby | mit | 19 | main | 604 | require "rails_helper"
RSpec.describe Flow::Steps::ProviderMeansStateBenefits::StateBenefitsStep, type: :request do
let(:application) { create(:legal_aid_application) }
describe "#path" do
subject { described_class.path.call(application) }
it { is_expected.to eq new_providers_legal_aid_application_means_... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/provider_means_state_benefits/receives_state_benefits_step_spec.rb | Ruby | mit | 19 | main | 2,217 | require "rails_helper"
RSpec.describe Flow::Steps::ProviderMeansStateBenefits::ReceivesStateBenefitsStep, type: :request do
let(:application) { create(:legal_aid_application) }
describe "#path" do
subject { described_class.path.call(application) }
it { is_expected.to eq providers_legal_aid_application_me... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/provider_means_state_benefits/add_other_state_benefits_step_spec.rb | Ruby | mit | 19 | main | 1,311 | require "rails_helper"
RSpec.describe Flow::Steps::ProviderMeansStateBenefits::AddOtherStateBenefitsStep, type: :request do
let(:application) { create(:legal_aid_application) }
describe "#path" do
subject { described_class.path.call(application) }
it { is_expected.to eq providers_legal_aid_application_me... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/provider_capital_disregards/mandatory_step_spec.rb | Ruby | mit | 19 | main | 2,135 | require "rails_helper"
RSpec.describe Flow::Steps::ProviderCapitalDisregards::MandatoryStep, type: :request do
let(:legal_aid_application) { build_stubbed(:legal_aid_application) }
let(:passported?) { nil }
let(:provider_checking_or_checked_citizens_means_answers?) { nil }
let(:mandatory_disregard) { nil }
... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/provider_capital_disregards/add_details_step_spec.rb | Ruby | mit | 19 | main | 2,793 | require "rails_helper"
RSpec.describe Flow::Steps::ProviderCapitalDisregards::AddDetailsStep, type: :request do
let(:legal_aid_application) { build_stubbed(:legal_aid_application) }
let(:disregard) { build_stubbed(:capital_disregard, legal_aid_application:) }
let(:passported?) { nil }
let(:provider_checking_o... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/provider_capital_disregards/discretionary_step_spec.rb | Ruby | mit | 19 | main | 2,633 | require "rails_helper"
RSpec.describe Flow::Steps::ProviderCapitalDisregards::DiscretionaryStep, type: :request do
let(:legal_aid_application) { build_stubbed(:legal_aid_application) }
let(:passported?) { nil }
let(:provider_checking_or_checked_citizens_means_answers?) { nil }
let(:discretionary_disregard) { ... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/addresses/home_address_manuals_step_spec.rb | Ruby | mit | 19 | main | 647 | require "rails_helper"
RSpec.describe Flow::Steps::Addresses::HomeAddressManualsStep, type: :request do
let(:legal_aid_application) { create(:legal_aid_application) }
describe "#path" do
subject { described_class.path.call(legal_aid_application) }
it { is_expected.to eq providers_legal_aid_application_ho... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/addresses/non_uk_home_addresses_step_spec.rb | Ruby | mit | 19 | main | 660 | require "rails_helper"
RSpec.describe Flow::Steps::Addresses::NonUkHomeAddressesStep, type: :request do
let(:legal_aid_application) { create(:legal_aid_application) }
describe "#path" do
subject { described_class.path.call(legal_aid_application) }
it { is_expected.to eq providers_legal_aid_application_ho... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/addresses/correspondence_address_lookups_step_spec.rb | Ruby | mit | 19 | main | 800 | require "rails_helper"
RSpec.describe Flow::Steps::Addresses::CorrespondenceAddressLookupsStep, type: :request do
let(:legal_aid_application) { create(:legal_aid_application) }
describe "#path" do
subject { described_class.path.call(legal_aid_application) }
it { is_expected.to eq providers_legal_aid_appl... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/addresses/correspondence_address_care_ofs_step_spec.rb | Ruby | mit | 19 | main | 2,278 | require "rails_helper"
RSpec.describe Flow::Steps::Addresses::CorrespondenceAddressCareOfsStep, type: :request do
let(:legal_aid_application) { build_stubbed(:legal_aid_application, applicant:) }
let(:applicant) { build_stubbed(:applicant) }
describe "#path" do
subject { described_class.path.call(legal_aid_... |
github | ministryofjustice/laa-apply-for-legal-aid | https://github.com/ministryofjustice/laa-apply-for-legal-aid | spec/services/flow/steps/addresses/correspondence_address_manuals_step_spec.rb | Ruby | mit | 19 | main | 1,190 | require "rails_helper"
RSpec.describe Flow::Steps::Addresses::CorrespondenceAddressManualsStep, type: :request do
let(:legal_aid_application) { create(:legal_aid_application, :with_applicant) }
let(:address) { create(:address, applicant: legal_aid_application.applicant, care_of:) }
describe "#path" do
subje... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.