From 1301f888f3739d4be7f844e0782670530f6a6059 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Fri, 27 Mar 2026 08:38:41 +0000 Subject: [PATCH] Remove "it" from the test descriptions --- test/discogs_test.exs | 2 +- test/last_fm/feed_test.exs | 2 +- test/last_fm_test.exs | 4 ++-- test/music_brainz/release_test.exs | 4 ++-- test/music_brainz_test.exs | 4 ++-- test/music_library/artists_test.exs | 6 +++--- test/music_library/assets/image_test.exs | 2 +- test/music_library/records/record_test.exs | 2 +- test/music_library/wishlist_test.exs | 4 ++-- .../controllers/collection_controller_test.exs | 16 ++++++++-------- .../controllers/session_controller_test.exs | 8 ++++---- .../live/artist_live/show_test.exs | 8 ++++---- .../live/collection_live/index_test.exs | 8 ++++---- .../live/collection_live/show_test.exs | 2 +- .../live/stats_live/index_test.exs | 12 ++++++------ .../live/wishlist_live/show_test.exs | 2 +- 16 files changed, 43 insertions(+), 43 deletions(-) diff --git a/test/discogs_test.exs b/test/discogs_test.exs index f0cec0e3..fadc92f7 100644 --- a/test/discogs_test.exs +++ b/test/discogs_test.exs @@ -4,7 +4,7 @@ defmodule DiscogsTest do alias Discogs.Fixtures describe "get_artist/1" do - test "it returns the artist" do + test "returns the artist" do discogs_id = "discogs_id" expected_info = diff --git a/test/last_fm/feed_test.exs b/test/last_fm/feed_test.exs index aa90cecb..d209498e 100644 --- a/test/last_fm/feed_test.exs +++ b/test/last_fm/feed_test.exs @@ -37,7 +37,7 @@ defmodule LastFm.FeedTest do } describe "update and broadcast" do - test "it stores the track and broadcasts the updated track count" do + test "stores the track and broadcasts the updated track count" do :ok = Feed.subscribe() assert {:ok, 2} == Feed.update([@track_two, @track_one]) diff --git a/test/last_fm_test.exs b/test/last_fm_test.exs index eb35cf75..e4acefca 100644 --- a/test/last_fm_test.exs +++ b/test/last_fm_test.exs @@ -4,7 +4,7 @@ defmodule LastFmTest do alias LastFm.{Artist, Fixtures, Scrobble} describe "get_artist_info/1" do - test "it returns the artist info" do + test "returns the artist info" do name = "Steven Wilson" musicbrainz_id = Ecto.UUID.generate() @@ -22,7 +22,7 @@ defmodule LastFmTest do end describe "scrobble/2" do - test "it returns the scrobbled track" do + test "returns the scrobbled track" do scrobbles = [ %Scrobble{ track: "Wonderland", diff --git a/test/music_brainz/release_test.exs b/test/music_brainz/release_test.exs index 6d0cca81..24f6a786 100644 --- a/test/music_brainz/release_test.exs +++ b/test/music_brainz/release_test.exs @@ -4,7 +4,7 @@ defmodule MusicBrainz.ReleaseTest do alias MusicBrainz.{Fixtures, Release} describe "release_duration/1" do - test "it returns the total milliseconds" do + test "returns the total milliseconds" do release = Fixtures.Release.release_with_media(:marbles) |> Release.from_api_response() @@ -12,7 +12,7 @@ defmodule MusicBrainz.ReleaseTest do assert Release.release_duration(release) == 5_933_595 end - test "it handles empty durations" do + test "handles empty durations" do release = Fixtures.Release.release_with_media(:marbles) |> put_in(["media", Access.all(), "tracks", Access.all(), "length"], nil) diff --git a/test/music_brainz_test.exs b/test/music_brainz_test.exs index dc973310..b243f36a 100644 --- a/test/music_brainz_test.exs +++ b/test/music_brainz_test.exs @@ -7,7 +7,7 @@ defmodule MusicBrainzTest do alias MusicBrainz.ReleaseGroupSearchResult describe "search_release_group/2" do - test "it returns results with correct limit and offset" do + test "returns results with correct limit and offset" do results = release_group_search_results() expected_results = @@ -26,7 +26,7 @@ defmodule MusicBrainzTest do end describe "search_release_by_barcode/1" do - test "it returns releases belonging to the same release group" do + test "returns releases belonging to the same release group" do barcode = "5052205070023" releases = diff --git a/test/music_library/artists_test.exs b/test/music_library/artists_test.exs index 4fe9e0a8..d985622f 100644 --- a/test/music_library/artists_test.exs +++ b/test/music_library/artists_test.exs @@ -6,7 +6,7 @@ defmodule MusicLibrary.ArtistsTest do alias MusicLibrary.Artists describe "get_artist/1" do - test "it returns records with essential data" do + test "returns records with essential data" do record = record() [expected] = record.artists @@ -17,7 +17,7 @@ defmodule MusicLibrary.ArtistsTest do end describe "get_all_artist_ids/0" do - test "it returns unique artist IDs" do + test "returns unique artist IDs" do marillion_record = record_with_artist("Marillion") _another_marillion_record = record_with_artist("Marillion") steven_wilson_record = record_with_artist("Steven Wilson") @@ -83,7 +83,7 @@ defmodule MusicLibrary.ArtistsTest do end describe "refresh_artist_info/1" do - test "it stores musicbrainz and discogs data" do + test "stores musicbrainz and discogs data" do steven_wilson_musicbrainz_id = "3a51b862-0144-40f6-aa17-6aaeefea29d9" Req.Test.stub(MusicBrainz.API, fn conn -> diff --git a/test/music_library/assets/image_test.exs b/test/music_library/assets/image_test.exs index 53ec303d..69bceed1 100644 --- a/test/music_library/assets/image_test.exs +++ b/test/music_library/assets/image_test.exs @@ -4,7 +4,7 @@ defmodule MusicLibrary.Assets.ImageTest do alias MusicLibrary.Assets.Image describe "resize/1" do - test "it resizes to the desired size" do + test "resizes to the desired size" do # Use the cached cover data which is much faster than reading from disk cover_data = Image.fallback_data() {:ok, resized_cover} = Image.resize(cover_data) diff --git a/test/music_library/records/record_test.exs b/test/music_library/records/record_test.exs index 6dd839dc..195c3c33 100644 --- a/test/music_library/records/record_test.exs +++ b/test/music_library/records/record_test.exs @@ -97,7 +97,7 @@ defmodule MusicLibrary.Records.RecordTest do end describe "add_musicbrainz_data/2" do - test "it updates release_ids and included_release_group_ids" do + test "updates release_ids and included_release_group_ids" do record = %Record{} assert record.release_ids == [] assert record.included_release_group_ids == [] diff --git a/test/music_library/wishlist_test.exs b/test/music_library/wishlist_test.exs index ce46c8d5..2f7f8095 100644 --- a/test/music_library/wishlist_test.exs +++ b/test/music_library/wishlist_test.exs @@ -23,11 +23,11 @@ defmodule MusicLibrary.WishlistTest do assert [%{title: "Brave"}, %{title: "Brave"}] = Wishlist.search_records("brave") end - test "it respects limit" do + test "respects limit" do assert [%{title: "Brave"}] = Wishlist.search_records("brave", limit: 1) end - test "it respects offset" do + test "respects offset" do [first_match] = Wishlist.search_records("brave", limit: 1) [second_match] = Wishlist.search_records("brave", limit: 1, offset: 1) assert first_match !== second_match diff --git a/test/music_library_web/controllers/collection_controller_test.exs b/test/music_library_web/controllers/collection_controller_test.exs index 6883f7af..4189e565 100644 --- a/test/music_library_web/controllers/collection_controller_test.exs +++ b/test/music_library_web/controllers/collection_controller_test.exs @@ -15,13 +15,13 @@ defmodule MusicLibraryWeb.CollectionControllerTest do describe "GET /api/collection/latest" do setup [:create_record] - test "it requires authentication", %{conn: conn} do + test "requires authentication", %{conn: conn} do conn = get(conn, ~p"/api/collection/latest") assert conn.status == 401 end - test "it returns the latest record", %{conn: conn, record: record} do + test "returns the latest record", %{conn: conn, record: record} do conn = conn |> put_req_header("authorization", "Bearer #{api_token()}") @@ -34,14 +34,14 @@ defmodule MusicLibraryWeb.CollectionControllerTest do describe "GET /api/collection/random" do setup [:create_record] - test "it requires authentication", %{conn: conn} do + test "requires authentication", %{conn: conn} do conn = get(conn, ~p"/api/collection/random") assert conn.status == 401 end # We're not testing random here - the query is solid enough - test "it returns a random record", %{conn: conn, record: record} do + test "returns a random record", %{conn: conn, record: record} do conn = conn |> put_req_header("authorization", "Bearer #{api_token()}") @@ -54,13 +54,13 @@ defmodule MusicLibraryWeb.CollectionControllerTest do describe "GET /api/collection" do setup [:create_record] - test "it requires authentication", %{conn: conn} do + test "requires authentication", %{conn: conn} do conn = get(conn, ~p"/api/collection") assert conn.status == 401 end - test "it returns a paginated list of records", %{conn: conn, record: record} do + test "returns a paginated list of records", %{conn: conn, record: record} do conn = conn |> put_req_header("authorization", "Bearer #{api_token()}") @@ -78,13 +78,13 @@ defmodule MusicLibraryWeb.CollectionControllerTest do describe "GET /api/collection/on_this_day" do setup [:create_record] - test "it requires authentication", %{conn: conn} do + test "requires authentication", %{conn: conn} do conn = get(conn, ~p"/api/collection/on_this_day") assert conn.status == 401 end - test "it returns a list of records", %{conn: conn, record: record} do + test "returns a list of records", %{conn: conn, record: record} do conn = conn |> put_req_header("authorization", "Bearer #{api_token()}") diff --git a/test/music_library_web/controllers/session_controller_test.exs b/test/music_library_web/controllers/session_controller_test.exs index 93e19711..46135d3e 100644 --- a/test/music_library_web/controllers/session_controller_test.exs +++ b/test/music_library_web/controllers/session_controller_test.exs @@ -3,7 +3,7 @@ defmodule MusicLibraryWeb.SessionControllerTest do describe "GET /login" do @tag :logged_out - test "it shows the login form", %{conn: conn} do + test "shows the login form", %{conn: conn} do conn = get(conn, "/login") response = html_response(conn, 200) @@ -12,7 +12,7 @@ defmodule MusicLibraryWeb.SessionControllerTest do assert response =~ "Login" end - test "it resets the session", %{conn: conn} do + test "resets the session", %{conn: conn} do conn = get(conn, "/login") session = get_session(conn) @@ -23,7 +23,7 @@ defmodule MusicLibraryWeb.SessionControllerTest do describe "POST /sessions/create" do @tag :logged_out - test "it refuses an invalid password", %{conn: conn} do + test "refuses an invalid password", %{conn: conn} do conn = post(conn, ~p"/sessions/create", %{"password" => "wrong password"}) {"location", location} = @@ -39,7 +39,7 @@ defmodule MusicLibraryWeb.SessionControllerTest do end @tag :logged_out - test "it accepts a valid password", %{conn: conn} do + test "accepts a valid password", %{conn: conn} do valid_password = Application.get_env(:music_library, MusicLibraryWeb) |> Keyword.fetch!(:login_password) diff --git a/test/music_library_web/live/artist_live/show_test.exs b/test/music_library_web/live/artist_live/show_test.exs index 7024051a..ae20617f 100644 --- a/test/music_library_web/live/artist_live/show_test.exs +++ b/test/music_library_web/live/artist_live/show_test.exs @@ -26,7 +26,7 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do describe "Show artist" do setup :fill_collection - test "it shows the artist bio and play count", %{ + test "shows the artist bio and play count", %{ conn: conn, artist_musicbrainz_id: artist_musicbrainz_id } do @@ -47,7 +47,7 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do |> assert_has("dt", "Biography") end - test "it gracefully handles errors in fetching bio and play count", %{ + test "gracefully handles errors in fetching bio and play count", %{ conn: conn, artist_musicbrainz_id: artist_musicbrainz_id } do @@ -69,7 +69,7 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do |> assert_has("div", "Error loading biography") end - test "it shows the artist country and MB id", %{ + test "shows the artist country and MB id", %{ conn: conn, artist_musicbrainz_id: artist_musicbrainz_id } do @@ -91,7 +91,7 @@ defmodule MusicLibraryWeb.ArtistLive.ShowTest do |> assert_has("code", artist_musicbrainz_id) end - test "it shows records from the collection and the wishlist", %{ + test "shows records from the collection and the wishlist", %{ conn: conn, collection_record: collection_record, artist_musicbrainz_id: artist_musicbrainz_id diff --git a/test/music_library_web/live/collection_live/index_test.exs b/test/music_library_web/live/collection_live/index_test.exs index 053266bb..c8abaa00 100644 --- a/test/music_library_web/live/collection_live/index_test.exs +++ b/test/music_library_web/live/collection_live/index_test.exs @@ -244,7 +244,7 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do end describe "Adding a new record" do - test "it shows the import modal", %{conn: conn} do + test "shows the import modal", %{conn: conn} do conn |> visit(~p"/collection") |> click_link("Add") @@ -253,7 +253,7 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do |> assert_path(~p"/collection/import") end - test "it imports a record when selected", %{conn: conn} do + test "imports a record when selected", %{conn: conn} do release_group_search_results = Map.get(release_group_search_results(), "release-groups") first_release_group_search_result = hd(release_group_search_results) @@ -343,7 +343,7 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do end describe "Add via barcode scan" do - test "it tracks the camera status", %{conn: conn} do + test "tracks the camera status", %{conn: conn} do session = conn |> visit(~p"/collection/scan") @@ -361,7 +361,7 @@ defmodule MusicLibraryWeb.CollectionLive.IndexTest do |> assert_has("video#camera-preview") end - test "it adds a record after scanning", %{conn: conn} do + test "adds a record after scanning", %{conn: conn} do barcode = "5037300650128" releases = releases(:marbles) diff --git a/test/music_library_web/live/collection_live/show_test.exs b/test/music_library_web/live/collection_live/show_test.exs index 74d820d8..93b43d0a 100644 --- a/test/music_library_web/live/collection_live/show_test.exs +++ b/test/music_library_web/live/collection_live/show_test.exs @@ -28,7 +28,7 @@ defmodule MusicLibraryWeb.CollectionLive.ShowTest do end describe "Show record" do - test "it includes all needed information", %{conn: conn} do + test "includes all needed information", %{conn: conn} do record = record() transform = %Transform{hash: record.cover_hash, width: nil} payload = Transform.encode!(transform) diff --git a/test/music_library_web/live/stats_live/index_test.exs b/test/music_library_web/live/stats_live/index_test.exs index b2f16234..c0c3a1d6 100644 --- a/test/music_library_web/live/stats_live/index_test.exs +++ b/test/music_library_web/live/stats_live/index_test.exs @@ -28,7 +28,7 @@ defmodule MusicLibraryWeb.StatsLive.IndexTest do describe "Stats home page" do setup [:fill_collection, :fill_wishlist] - test "it shows the collection counts (total, format, and type)", %{ + test "shows the collection counts (total, format, and type)", %{ conn: conn, collection: collection } do @@ -52,7 +52,7 @@ defmodule MusicLibraryWeb.StatsLive.IndexTest do end) end - test "it shows the latest purchase", %{conn: conn, collection: collection} do + test "shows the latest purchase", %{conn: conn, collection: collection} do latest_record = List.last(collection) session = @@ -65,13 +65,13 @@ defmodule MusicLibraryWeb.StatsLive.IndexTest do end end - test "it shows the wishlist total count", %{conn: conn, wishlist: wishlist} do + test "shows the wishlist total count", %{conn: conn, wishlist: wishlist} do conn |> visit("/") |> assert_has("dd", wishlist |> length() |> Integer.to_string()) end - test "it displays records for the current date in the 'On This Day' section", %{ + test "displays records for the current date in the 'On This Day' section", %{ conn: conn, collection: collection } do @@ -103,7 +103,7 @@ defmodule MusicLibraryWeb.StatsLive.IndexTest do refute_has(session, "##{record_yesterday.id} h2", escape(record_yesterday.title)) end - test "it updates the 'On This Day' records when the date is changed", %{ + test "updates the 'On This Day' records when the date is changed", %{ conn: conn, collection: collection } do @@ -146,7 +146,7 @@ defmodule MusicLibraryWeb.StatsLive.IndexTest do end describe "Scrobble activity" do - test "it shows the scrobble activity", %{conn: conn} do + test "shows the scrobble activity", %{conn: conn} do # In test we don't run the LastFm.Refresh worker, # so we need to interact directly with the LastFm.Feed to have some data # diff --git a/test/music_library_web/live/wishlist_live/show_test.exs b/test/music_library_web/live/wishlist_live/show_test.exs index 41dafa16..e053eb7a 100644 --- a/test/music_library_web/live/wishlist_live/show_test.exs +++ b/test/music_library_web/live/wishlist_live/show_test.exs @@ -20,7 +20,7 @@ defmodule MusicLibraryWeb.WishlistLive.ShowTest do end describe "Show record" do - test "it includes all needed information", %{conn: conn} do + test "includes all needed information", %{conn: conn} do record = record(purchased_at: nil) transform = %Transform{hash: record.cover_hash, width: nil} payload = Transform.encode!(transform)