Sha256: 3a42be4e69b081e7ac5447c3fd3971535278df3fe26e7ba892f68b5e3b3804b5

Contents?: true

Size: 349 Bytes

Versions: 3

Compression:

Stored size: 349 Bytes

Contents

require 'rails_helper'

describe ErrorsSerializer do
  let(:errors) { build(:user, email: 'invalid').tap(&:valid?).errors }

  subject { described_class.new(errors).attributes }

  it { expect(subject[:message]).to eq('Validation failed: Email is invalid') }
  it { expect(subject[:code]).to eq(0) }
  it { expect(subject[:status]).to eq(422) }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-ios-rails-1.0.2 spec/serializers/errors_serializer_spec.rb
devise-ios-rails-1.0.1 spec/serializers/errors_serializer_spec.rb
devise-ios-rails-1.0.0 spec/serializers/errors_serializer_spec.rb