Skip to content

Jane's MediaRanker#23

Open
JaneEdwMcN wants to merge 32 commits intoAda-C10:masterfrom
JaneEdwMcN:master
Open

Jane's MediaRanker#23
JaneEdwMcN wants to merge 32 commits intoAda-C10:masterfrom
JaneEdwMcN:master

Conversation

@JaneEdwMcN
Copy link

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. I wrote a method that sorts all of the Works by vote count, reverses the sort so that the most votes come first and then takes the first instance of Work from the sorted Works. This returns the Work instance with the most votes.
Describe how you approached testing that model method. What edge cases did you come up with? I tested the edge case of a user opening up the developer tools and manually changing the category when creating or editing a work. The test checks that a Work's category must be a book, movie, or album.
What are session and flash? What is the difference between them? Session is a hash type object that store data throughout a 'session'. Flash is a type of hash that sends messages. Flash will go away after the next request-response cycle, but a session will not.
Describe a controller filter you wrote. I wrote a controller filter in the works_controller that locates a work by params id.
What was one thing that you gained more clarity on through this assignment? How to link to pages and display them with different CRUD methods.
What is the Heroku URL of your deployed application? http://media-ranker-jane.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? Maybe reset the instructor created Heroku app every now and then to clear up all the different weird things people added to it. Someone created a ridiculously long username that made scrolling on the list users page frustrating.

@CheezItMan
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good commit messages
Comprehension questions Check, If you have questions like the ridiculous usernames, you can ask those individually or in slack on the project channel.
General
Rails fundamentals (RESTful routing, use of named paths) Well done
Views are well-organized (DRY, use of semantic HTML, use of partials) Awesome work using partials to DRY up the list of works.
Errors are reported to the user Check
Business logic lives in the models Check
Models are thoroughly tested, including relations, validations and any custom logic Check, nice job testing. I left some notes on edge-cases.
Wave 1 - Media
Splash page shows the three media categories Check
Basic CRUD operations on media are present and functional Check
Wave 2 - Users and Votes
Users can log in and log out Check
The ID of the current user is stored in the session Check
A user cannot vote for the same media more than once Check
All media lists are ordered by vote count Check
Splash page contains a media spotlight Check
Wave 3 - Users and Votes
Media pages contain lists of voting users Check
Individual user pages and the user list are present Check
Optional - Styling
Bootstrap is used appropriately Nice work with Bootstrap
Look and feel is similar to the original Well done
Overall Excellent work. You hit all the learning goals. Great work with partials and you did a good job with testing. Fantastic work.

# Act
result = user.valid?
# Assert
expect(result).must_equal false

Choose a reason for hiding this comment

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

You should then make the username 2 letters long and verify that the user is now valid.


end

describe "custom methods" do

Choose a reason for hiding this comment

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

empty describe.

expect(result).must_equal false
end

it 'a publication year must be greater than 0' do

Choose a reason for hiding this comment

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

You should also test 0

expect(result).must_equal false
end

it 'a publication year must be greater less than 2019' do

Choose a reason for hiding this comment

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

Just a note on the validation, hardcoding the valid years to be limited to 2019, means that in a year or two...

expect(result).must_equal false
end

it 'a description may not be more than 250 characters' do

Choose a reason for hiding this comment

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

You should also test at 249 characters.

end

it 'a description must be 5 or more characters' do
# Arrange

Choose a reason for hiding this comment

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

Test with 4 letters then 5.

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