here come the tags

This commit is contained in:
Roscoe 2025-09-10 03:46:23 +01:00
commit 29368bfdb9
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
16 changed files with 155 additions and 2 deletions

View 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

9
test/fixtures/tag_to_clips.yml vendored Normal file
View file

@ -0,0 +1,9 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
clip: one
tag: one
two:
clip: two
tag: two

7
test/fixtures/tags.yml vendored Normal file
View file

@ -0,0 +1,7 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
name: MyString
two:
name: MyString

7
test/models/tag_test.rb Normal file
View file

@ -0,0 +1,7 @@
require "test_helper"
class TagTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View file

@ -0,0 +1,7 @@
require "test_helper"
class TagToClipTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end