spec/models/account_spec.rb in bookingsync-engine-5.1.0 vs spec/models/account_spec.rb in bookingsync-engine-6.0.0

- old
+ new

@@ -65,16 +65,27 @@ it_behaves_like "it takes attributes from auth" end end end + # deprecated describe ".find_by_host_and_synced_id" do let!(:account_1) { Account.create!(synced_id: 1) } let!(:account_2) { Account.create!(synced_id: 2) } let!(:account_3) { Account.create!(synced_id: 3) } it "returns the right account" do expect(Account.find_by_host_and_synced_id("any_host", 3)).to eq account_3 + end + end + + describe ".find_by_host_and_bookingsync_id_key" do + let!(:account_1) { Account.create!(synced_id: 1) } + let!(:account_2) { Account.create!(synced_id: 2) } + let!(:account_3) { Account.create!(synced_id: 3) } + + it "returns the right account" do + expect(Account.find_by_host_and_bookingsync_id_key("any_host", 3)).to eq account_3 end end describe "#token" do let!(:account) { Account.create!(synced_id: 123, oauth_access_token: "token",