fix posting with services, fix cuke
This commit is contained in:
parent
00f1adc8b2
commit
c66bd9d6d8
2 changed files with 3 additions and 8 deletions
|
|
@ -11,14 +11,9 @@ app.models.StatusMessage = app.models.Post.extend({
|
||||||
toJSON : function(){
|
toJSON : function(){
|
||||||
return {
|
return {
|
||||||
status_message : _.clone(this.attributes),
|
status_message : _.clone(this.attributes),
|
||||||
aspect_ids : this.get("aspect_ids") && this.get("aspect_ids").split(","),
|
aspect_ids : this.get("aspect_ids"),
|
||||||
photos : this.photos && this.photos.pluck("id"),
|
photos : this.photos && this.photos.pluck("id"),
|
||||||
services : mungeServices(this.get("services"))
|
services : this.get("services")
|
||||||
}
|
|
||||||
|
|
||||||
function mungeServices (values) {
|
|
||||||
if(!values) { return; }
|
|
||||||
return values.length > 1 ? values : [values]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ end
|
||||||
def select_from_dropdown(option_text, dropdown)
|
def select_from_dropdown(option_text, dropdown)
|
||||||
dropdown.click
|
dropdown.click
|
||||||
within ".dropdown-menu" do
|
within ".dropdown-menu" do
|
||||||
link = find("a:contains('#{option_text}')")
|
link = find("input[value=['#{option_text}']")
|
||||||
link.should be_visible
|
link.should be_visible
|
||||||
link.click
|
link.click
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue