-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add conversation part controller #1299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of things, but nothing major
|
||
assert rendered_json == expected_json | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you move this here by accident?
conversation_id: conversation.id | ||
} | ||
|
||
{:ok, %ConversationPart{}} = Messages.add_part(attrs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should at least assert it belongs to the conversation here, if not checking the rest of the attributes.
assert result.id == conversation.id | ||
end | ||
|
||
test "should return conversation of a Conversation" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This returns it for a conversation part
7f2d520
to
8a108ce
Compare
What's in this PR?
create_changeset
create_changeset
Policy.ConversationPart.create?
Policy.ConversationPart.create?
Messages.create_conversation_part(params)
Messages.ConversationPart.create
create_changeset
Messages.create_conversation_part(params)
create_changeset
is private, make sure to test casting behavior toConversationPartController
:create
endpointMessages.create_conversation_part
:create
endpointPolicy.ConversationPart.show?
Policy.ConversationPart.show?
ConversationPartController
:show
endpoint:show
endpointPolicy.ConversationPart.scope/2
ConversationPart
records belonging toConversation
records defined byPolicy.Conversation.scope/2
Policy.ConversationPart.scope
:index
endpointconversation.conversationParts
in the clientconversation_id
, but not sure yet:index
endpointReferences
Fixes #1291
Fixes #1290
Fixes #1289