Skip to content

Commit b7fa057

Browse files
author
Sebastian Wilgosz
authored
Merge pull request driggl#11 from nthngoc277/fix-error_mapper_spec
Change expectation for mapped_errors
2 parents b23bca4 + c8b0cc1 commit b7fa057

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spec/error_mapper_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
require 'spec_helper'
22

33
RSpec.describe JsonapiErrorsHandler::ErrorMapper do
4+
let(:mapped_errors) { described_class.mapped_errors }
5+
6+
describe '.mapped_errors' do
7+
it 'returns a Hash' do
8+
expect(mapped_errors).to be_instance_of(Hash)
9+
end
10+
11+
it 'returns current value of class variable @mapped_errors' do
12+
expect(mapped_errors).to eq described_class.class_variable_get(:@@mapped_errors)
13+
end
14+
end
15+
416
describe '.map_errors!' do
517
let(:errors_hash) { {'Error' => 'Invalid'} }
618

0 commit comments

Comments
 (0)