不要怂,就是干,撸起袖子干!

Commit 6ef4eea9 by Victor Pontis

breaking tests for assns w/ foreignKey fields

when specifying an associaiton that has a foreign key in which the attribute name and field name are different
certain helper methods do not work because they fail to substitute the attribute name with the field name in the
query, this includes set[AS] and remove[AS]
1 parent 2bbf6397
Showing with 5 additions and 0 deletions
...@@ -1573,6 +1573,8 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -1573,6 +1573,8 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
self.Project.create({name: 'Good Will Hunting'}) self.Project.create({name: 'Good Will Hunting'})
]); ]);
}).spread(function (user, project) { }).spread(function (user, project) {
self.user = user;
self.project = project;
return user.addProject(project).return(user); return user.addProject(project).return(user);
}).then(function(user) { }).then(function(user) {
return user.getProjects(); return user.getProjects();
...@@ -1580,6 +1582,9 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -1580,6 +1582,9 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
var project = projects[0]; var project = projects[0];
expect(project).to.be.defined; expect(project).to.be.defined;
return self.user.removeProject(project);
}).then(function() {
return self.user.setProjects([project]);
}); });
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!