Sha256: 63e9b8e6e50e3b700840b13224313fabd2de89c1c58221c3d1a8d67005fb0454
Contents?: true
Size: 704 Bytes
Versions: 2
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Azeroth::RequestHandler::Update do describe '#process' do it_behaves_like 'a request handler' do let(:expected_resource) { document } let!(:document) { create(:document) } let(:extra_params) do { id: document.id, document: { name: 'New Name' } } end let(:expected_json) do decorator.as_json.merge('name' => 'New Name') end it 'updates the values' do expect { handler.process } .to change { document.reload.name } .from(document.name) .to('New Name') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
azeroth-0.2.0 | spec/lib/azeroth/request_handler/update_spec.rb |
azeroth-0.1.0 | spec/lib/azeroth/request_handler/update_spec.rb |