-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat/job application show #35
base: main
Are you sure you want to change the base?
Changes from 2 commits
ed74152
7252f8a
8b55bbf
699dc2f
34a02ad
f337342
63f3062
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another potential edge case would be a lack of parameters being sent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is worth doing. I will incorporate this edge case in the testing, if it requires reworking the method, I will incorporate that as well. Thank you :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Edge case has been addressed and read me has been updated accordingly, If the change is suitable, feel free to resolve conversation and/or resolve conflict to merge :) Reach out if there Is anything I can help clarify |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,6 +109,18 @@ | |
expect(json[:message]).to eq("Job application not found") | ||
expect(json[:status]).to eq(404) | ||
end | ||
|
||
it "returns error serializer if no params are passed in URL for job application id" do | ||
get "/api/v1/users/#{@user.id}/job_applications/" | ||
|
||
expect(response).to_not be_successful | ||
expect(response.status).to eq(400) | ||
|
||
json = JSON.parse(response.body, symbolize_names: true) | ||
|
||
expect(json[:message]).to eq("Job application ID is missing") | ||
expect(json[:status]).to eq(400) | ||
end | ||
Comment on lines
+112
to
+123
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for adding this test and being very through with your work. I like your error message here, as I feel it is very informative and user-friendly. |
||
end | ||
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.
This is a nice addition to the show action. I noticed that you are grabbing the ID from the params, and not from the authentication token. I'm curious about this decision, as both the companies and contacts are collecting it from the token.
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.
I noticed that the JobApplications controller is not utilizing the authentication tokens or the
authenticate_user
method that has been defined in the ApplicationController. Other controllers in the application are using these for authentication, so I wanted to flag this for consistency and security purposes.Could you clarify if this was intentional or an oversight? If it's an oversight, it might be worth adding the necessary authentication logic to ensure this controller aligns with the others. I'm curious to hear your thoughts!