Sha256: ff71fb93bb399751d6503b589b1b0a0ac699d028c09f579e2bdafb786f47638c
Contents?: true
Size: 1.57 KB
Versions: 9
Compression:
Stored size: 1.57 KB
Contents
require 'rails_helper' require 'mks/common/methodresponse' require 'mks/common/util' module Logistics module Core RSpec.describe CountriesController, type: :controller do include LookupSpec def get_namespace 'Logistics::Core' end routes { Logistics::Core::Engine.routes } let(:valid_attributes) { { code: FFaker::Name.name, name: FFaker::Name.name } } let(:invalid_attributes) { { code: '', name: FFaker::Name.name } } describe 'GET #index' do it 'gets all lookup' do get_index end end describe 'POST #create' do context 'with valid params' do it 'creates a new lookup' do post_valid end it 'should return a success message' do post_message end end context 'with invalid params' do it 'should return an error message' do post_invalid end end end describe 'PUT #update' do context 'with valid params' do let(:new_attributes) { { name: FFaker::Name.name } } it 'updates the requested lookup' do put_valid end it 'should return a success message' do put_message end end context 'with invalid params' do it 'should return an error message' do put_invalid end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems