Skip to content

New/nb mi/send message#39

Open
natashabuckham wants to merge 7 commits intomainfrom
new/nb-mi/send-message
Open

New/nb mi/send message#39
natashabuckham wants to merge 7 commits intomainfrom
new/nb-mi/send-message

Conversation

@natashabuckham
Copy link
Copy Markdown
Contributor

Completed send_message post and get routes. I think I've doubled up on a 'find id by handle method' looking at main. I put one in user repo and it looks like there's one in the helper methods in app.rb already - so that needs to be resolved in the merge. Will also need to add a link on the homepage view to get to send_message view.

require_relative './lib/dm_repository'
require 'sinatra/flash'
require_relative './lib/database_connection'
require "sinatra/base"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always prefer a " over a ' 😀

expect(response.status).to eq 200
expect(response.body).to include "You are logged in"

response = post("/send_message", recipient_handle: "Sam", contents: "Hello")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test covers so much more than its purpose. I am wondering if it could be restricted to just the send_message route so that the test is not affected by all the other things outside its parameters. This route should only be available when logged in so I am wondering, if it can't be tested independently, we should be looking at why not?

Copy link
Copy Markdown
Contributor

@pablisch pablisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work! Now get some rest 💛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants