Sha256: 57851ffd9e7bd168ba72b31a69e485893c3343381d0a48bd961a5b4b26bf7016
Contents?: true
Size: 719 Bytes
Versions: 9
Compression:
Stored size: 719 Bytes
Contents
require 'rails_helper' module Logistics module Core RSpec.describe DocumentTypeCategoriesController, 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_categories as @document_type_categories' do document_type_category = DocumentTypeCategory.create! valid_attributes get :index, format: :json expect(JSON(response.body)['data'].to_json).to eq([document_type_category].to_json) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems