Sha256: 972a395552d4192b47b0be6b816db4241cea55b3b521f84b821ad89982fcb59e
Contents?: true
Size: 703 Bytes
Versions: 9
Compression:
Stored size: 703 Bytes
Contents
require 'rails_helper' module Logistics module Core RSpec.describe DocumentTypeOriginsController, type: :controller do routes { Logistics::Core::Engine.routes } let(:valid_attributes) { { code: FFaker::Name.name, name: FFaker::Name.name, description: FFaker::Lorem.paragraph } } describe 'GET #index' do it 'assigns all document_type_origins as @document_type_origins' do document_type_origin = DocumentTypeOrigin.create! valid_attributes get :index, format: :json expect(JSON(response.body)['data'].to_json).to eq([document_type_origin].to_json) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems