Sha256: 6428018417597ca0aab2e27ecb9c5d0644c0bfd6c27c87dfd8e600537a312420
Contents?: true
Size: 579 Bytes
Versions: 2
Compression:
Stored size: 579 Bytes
Contents
# frozen_string_literal: true require "rails_helper" RSpec.describe Api::V1::UserSerializer, type: :serializer do let(:user) {create :user} describe "#user_details" do let(:params) {{type: :user_details}} let(:serialized_user) {described_class.new(user, params).serializable_hash} context "when get correct attributes" do it "should includes all attributes" do expect(serialized_user[:id]).to eq user.id expect(serialized_user[:email]).to eq user.email expect(serialized_user).to include(:email, :id) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
n_base_rails-0.1.2 | lib/spec/serializers/api/v1/user_serializer.rb |
n_base_rails-0.1.1 | lib/spec/serializers/api/v1/user_serializer.rb |