Sha256: d68ce779f01cc8a0e6607718c29f02d6dbd00976ff3d27936496a3c0ac3b2468
Contents?: true
Size: 853 Bytes
Versions: 1
Compression:
Stored size: 853 Bytes
Contents
require 'rails_helper' module Pwb RSpec.describe Api::V1::PropertiesController, type: :controller do routes { Pwb::Engine.routes } context 'with admin user' do login_admin_user let(:bulk_create_input ) do File.read(fixture_path + "/params/bulk_create.json") end describe 'bulk create' do it 'creates multiple properties' do bulk_create_params = { propertiesJSON: bulk_create_input } expect{ post :bulk_create, params: bulk_create_params }.to change(Prop, :count).by(4) expect(response.status).to eq(200) expect(response.content_type).to eq('application/json') # expect(I18n.t(I18n::Backend::ActiveRecord::Translation.last.key)).to eq(propertiesJSON[:i18n_value]) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pwb-1.4.0 | spec/controllers/pwb/api/v1/propeties_controller_spec.rb |