Initial commit

This commit is contained in:
Yaser
2026-08-13 19:56:46 +03:30
commit de1d57a67b
474 changed files with 43185 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# frozen_string_literal: true
require 'rails_helper'
describe 'Data Storage Titles configuraton class' do
context 'testing list function' do
let(:expected_values) { ['personal', 'company'] }
it 'reads configuration from the file' do
expect(UserStorageTitles.list).to eq(expected_values)
end
it 'cache preconfig and doesn\'t read from the file on every call' do
expect(UserStorageTitles.list).to eq(expected_values)
@template = {}
expect(UserStorageTitles.list).to eq(expected_values)
end
end
end

View File

@@ -0,0 +1,26 @@
# frozen_string_literal: true
require 'rails_helper'
describe 'Document Types configuraton class' do
context 'testing list function' do
let(:expected_values) { ['Passport', 'Identity card', 'Driver license', 'Utility Bill', 'Residental', 'Institutional'] }
before do
@template = { 'document_types' => ['Passport', 'Identity card', 'Driver license', 'Utility Bill', 'Residental', 'Institutional'] }
allow(YAML).to receive(:load_file).and_return(@template)
end
it 'reads configuration from the file' do
expect(DocumentTypes.list).to eq(expected_values)
end
it 'cache preconfig and doesn\'t read from the file on every call' do
expect(DocumentTypes.list).to eq(expected_values)
@template = {}
expect(DocumentTypes.list).to eq(expected_values)
end
end
end