Sha256: b385b0006116e6b99dbd5091ce61af91c446607c1c8b5d793e910bb4addb2b0c
Contents?: true
Size: 583 Bytes
Versions: 18
Compression:
Stored size: 583 Bytes
Contents
require "test_helper" class ReplaceStrategyTest < ActiveSupport::TestCase setup do options.merge!(strategy: {students: :replace}) end context "When records already exist" do setup do plan do |import| import.students end account.students.create!(name: "Ron Weasley", legacy_id: 457) end should "reimport the existing records" do import! assert_equal "Gryffindor", account.students.find_by_name("Ron Weasley").house, "Expected Ron's record to have been replaced with one that has a house" end end end
Version data entries
18 entries across 18 versions & 1 rubygems