Skip to content

Submitting MediaRanker#31

Open
emgord wants to merge 38 commits intoAda-C4:erg/masterfrom
emgord:erg/master
Open

Submitting MediaRanker#31
emgord wants to merge 38 commits intoAda-C4:erg/masterfrom
emgord:erg/master

Conversation

@emgord
Copy link
Copy Markdown

@emgord emgord commented Dec 4, 2015

Submitting MediaRanker final project. Right now my controller tests are mostly testing that the pages are re-directing to the right place, but I was struggling with coming up with tests to make sure that the desired action of creating/deleting/editing was happening beforehand. I was not sure if this was needed, since this is provided by active record, but wanted to be sure that I was actually doing what was intended.

@ElsaTKO ElsaTKO self-assigned this Dec 9, 2015
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 There's also a cool .increment! method that does the same thing as lines 9-10.

@ElsaTKO
Copy link
Copy Markdown

ElsaTKO commented Dec 9, 2015

This looks awesome! 😄 It might be worth putting controller finds like album = Album.find(params[:id]) into a before_action so they aren't repeated so many times in the controllers, but everything looks super clean. ❤️ the polymorphic paths and shared examples. CRUD tests are good to make sure model validations and your setup are working as you expect, and they generally just assert the record count or attribute, or change thereof.

Great job!

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