-
Notifications
You must be signed in to change notification settings - Fork 21
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
Completed Media Ranker #29
base: KED/master
Are you sure you want to change the base?
Changes from 1 commit
cda108c
4792c90
c3d93d2
7febcc9
de26c24
994b7cb
d4b318c
ecb205a
a790342
d5c74fd
3c9847e
a3aecd6
14c38f3
1f3a49c
c94ac27
6930d6b
01450e5
02822b6
e360b69
8fb8a13
c89bcee
b6d2764
bc49cc2
ad730c9
80ac720
3cda762
836d0af
2a1b470
78245b3
a753812
f79af1e
77f0c52
cab896f
1c0060f
392006d
cfdf599
d23dd2b
c46ed1a
4ea084b
e79c849
131373e
c8c91a4
fcad9cb
464b1d4
ab3ec47
e1c51e8
6dee57c
e833054
0b63f4f
79af199
25743dd
145af64
8a0ba69
d102896
fac53c8
eacd01e
7c69b5b
ae16f87
fec3d5a
b88cc42
c7cf364
781903a
85340db
54cb442
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,22 @@ | |
end | ||
end | ||
|
||
describe "PATCH 'update'" do | ||
let (:medium) do | ||
model.create(name: "Test") | ||
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. Since we're using this |
||
end | ||
|
||
it "redirects to show page" do | ||
patch :update, good_params.merge({id: medium.id}) | ||
expect(subject).to redirect_to polymorphic_path(medium) | ||
expect(model.all.last.name).to eq "zzzTest" | ||
end | ||
|
||
it "renders edit template on error" do | ||
patch :update, bad_params.merge({id: medium.id}) | ||
expect(subject).to render_template :edit | ||
expect(model.all.last.name).to eq "Test" | ||
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. It's good that we're testing the actual changes resulting (or not) from calling |
||
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.
I think either this closing curly brace should be on the same line as
album: { ...
or the key/value pairs in thealbum
sub-hash should be split out onto their own lines, to keep with the style of the containing hash.