here come the tags
This commit is contained in:
parent
c8732b6332
commit
29368bfdb9
16 changed files with 155 additions and 2 deletions
48
test/controllers/tag_to_clips_controller_test.rb
Normal file
48
test/controllers/tag_to_clips_controller_test.rb
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
require "test_helper"
|
||||
|
||||
class TagToClipsControllerTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
@tag_to_clip = tag_to_clips(:one)
|
||||
end
|
||||
|
||||
test "should get index" do
|
||||
get tag_to_clips_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get new_tag_to_clip_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create tag_to_clip" do
|
||||
assert_difference("TagToClip.count") do
|
||||
post tag_to_clips_url, params: { tag_to_clip: { clip_id: @tag_to_clip.clip_id, tag_id: @tag_to_clip.tag_id } }
|
||||
end
|
||||
|
||||
assert_redirected_to tag_to_clip_url(TagToClip.last)
|
||||
end
|
||||
|
||||
test "should show tag_to_clip" do
|
||||
get tag_to_clip_url(@tag_to_clip)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get edit_tag_to_clip_url(@tag_to_clip)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update tag_to_clip" do
|
||||
patch tag_to_clip_url(@tag_to_clip), params: { tag_to_clip: { clip_id: @tag_to_clip.clip_id, tag_id: @tag_to_clip.tag_id } }
|
||||
assert_redirected_to tag_to_clip_url(@tag_to_clip)
|
||||
end
|
||||
|
||||
test "should destroy tag_to_clip" do
|
||||
assert_difference("TagToClip.count", -1) do
|
||||
delete tag_to_clip_url(@tag_to_clip)
|
||||
end
|
||||
|
||||
assert_redirected_to tag_to_clips_url
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue