Initial commit
This commit is contained in:
21
spec/initializers/data_storage_titles_spec.rb
Normal file
21
spec/initializers/data_storage_titles_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user