Sha256: 70ecacb26b188ff85434d48db2aae9abad066477c28e24d73713384f22413c62
Contents?: true
Size: 702 Bytes
Versions: 12
Compression:
Stored size: 702 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DHS::Record do context 'build' do let(:datastore) { 'http://depay.fi/v2' } before do DHC.config.placeholder('datastore', datastore) class Feedback < DHS::Record endpoint '{+datastore}/content-ads/{campaign_id}/feedbacks' endpoint '{+datastore}/feedbacks' end end it 'builds a new item from scratch' do feedback = Feedback.build recommended: true expect(feedback).to be_kind_of Feedback expect(feedback.recommended).to eq true stub_request(:post, 'http://depay.fi/v2/feedbacks') .with(body: '{"recommended":true}') feedback.save end end end
Version data entries
12 entries across 12 versions & 1 rubygems