From fc95901de1b020b947d7bd52ba3dec40d9320d39 Mon Sep 17 00:00:00 2001 From: Nick Schot Date: Sun, 9 Sep 2018 00:45:36 +0200 Subject: [PATCH 1/2] add failing tests for nulling belongsTo relationship --- tests/acceptance/main-test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/acceptance/main-test.js b/tests/acceptance/main-test.js index 7978c8b6..c1b66817 100644 --- a/tests/acceptance/main-test.js +++ b/tests/acceptance/main-test.js @@ -55,6 +55,14 @@ module('Acceptance | main', function(hooks) { assert.equal(user.get('profile.firstName'), 'Terry'); assert.equal(user.get('profile.lastName'), 'Bubblewinkles'); + + changeset.set('profile', null); + + assert.equal(changeset.get('profile.content'), null); + + changeset.execute(); + + assert.equal(user.get('profile'), null); }) }); From 2a1d4f4008e1f5db0d96914da6ead3396480e320 Mon Sep 17 00:00:00 2001 From: Nick Schot Date: Sun, 9 Sep 2018 00:49:40 +0200 Subject: [PATCH 2/2] add failing tests for nulling belongsTo relationship --- tests/acceptance/main-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/main-test.js b/tests/acceptance/main-test.js index c1b66817..1f43a8eb 100644 --- a/tests/acceptance/main-test.js +++ b/tests/acceptance/main-test.js @@ -58,7 +58,7 @@ module('Acceptance | main', function(hooks) { changeset.set('profile', null); - assert.equal(changeset.get('profile.content'), null); + assert.equal(changeset.get('profile'), null); changeset.execute();