From 1da0087896bdfca213c035fe4a4238dcd46aea0f Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Thu, 12 Dec 2019 21:25:06 -0500 Subject: [PATCH] we'll add these later --- test/philomena/adverts_test.exs | 62 --- test/philomena/badges_test.exs | 121 ----- test/philomena/bans_test.exs | 178 -------- test/philomena/channels_test.exs | 119 ----- test/philomena/comments_test.exs | 62 --- test/philomena/commissions_test.exs | 124 ------ test/philomena/conversations_test.exs | 125 ------ test/philomena/dnp_entries_test.exs | 64 --- test/philomena/donations_test.exs | 62 --- test/philomena/duplicate_reports_test.exs | 74 ---- test/philomena/filters_test.exs | 62 --- test/philomena/forums_test.exs | 418 ------------------ test/philomena/galleries_test.exs | 124 ------ test/philomena/image_faves_test.exs | 62 --- test/philomena/image_features_test.exs | 62 --- test/philomena/image_hides_test.exs | 62 --- test/philomena/image_intensities_test.exs | 62 --- test/philomena/image_votes_test.exs | 62 --- test/philomena/images_test.exs | 361 --------------- test/philomena/mod_notes_test.exs | 62 --- test/philomena/notifications_test.exs | 137 ------ test/philomena/poll_options_test.exs | 67 --- test/philomena/poll_votes_test.exs | 62 --- test/philomena/polls_test.exs | 62 --- test/philomena/posts_test.exs | 62 --- test/philomena/reports_test.exs | 62 --- test/philomena/roles_test.exs | 62 --- test/philomena/site_notices_test.exs | 67 --- test/philomena/source_changes_test.exs | 62 --- test/philomena/static_pages_test.exs | 62 --- test/philomena/tag_changes_test.exs | 62 --- test/philomena/tags_test.exs | 121 ----- test/philomena/topics_test.exs | 124 ------ test/philomena/user_fingerprints_test.exs | 62 --- test/philomena/user_ips_test.exs | 62 --- test/philomena/user_links_test.exs | 62 --- test/philomena/user_name_changes_test.exs | 62 --- test/philomena/user_statistics_test.exs | 62 --- test/philomena/user_whitelists_test.exs | 62 --- test/philomena/users_test.exs | 408 ----------------- test/philomena/versions_test.exs | 62 --- test/philomena/vpns_test.exs | 62 --- .../controllers/channel_controller_test.exs | 88 ---- .../controllers/comment_controller_test.exs | 89 ---- .../controllers/dnp_entry_controller_test.exs | 88 ---- .../duplicate_report_controller_test.exs | 88 ---- .../controllers/image_controller_test.exs | 89 ---- .../controllers/page_controller_test.exs | 8 - .../controllers/setting_controller_test.exs | 88 ---- .../controllers/staff_controller_test.exs | 88 ---- .../controllers/stat_controller_test.exs | 88 ---- .../controllers/tag_controller_test.exs | 89 ---- .../controllers/user_link_controller_test.exs | 88 ---- test/philomena_web/views/error_view_test.exs | 14 - test/philomena_web/views/layout_view_test.exs | 3 - test/philomena_web/views/page_view_test.exs | 3 - 56 files changed, 5155 deletions(-) delete mode 100644 test/philomena/adverts_test.exs delete mode 100644 test/philomena/badges_test.exs delete mode 100644 test/philomena/bans_test.exs delete mode 100644 test/philomena/channels_test.exs delete mode 100644 test/philomena/comments_test.exs delete mode 100644 test/philomena/commissions_test.exs delete mode 100644 test/philomena/conversations_test.exs delete mode 100644 test/philomena/dnp_entries_test.exs delete mode 100644 test/philomena/donations_test.exs delete mode 100644 test/philomena/duplicate_reports_test.exs delete mode 100644 test/philomena/filters_test.exs delete mode 100644 test/philomena/forums_test.exs delete mode 100644 test/philomena/galleries_test.exs delete mode 100644 test/philomena/image_faves_test.exs delete mode 100644 test/philomena/image_features_test.exs delete mode 100644 test/philomena/image_hides_test.exs delete mode 100644 test/philomena/image_intensities_test.exs delete mode 100644 test/philomena/image_votes_test.exs delete mode 100644 test/philomena/images_test.exs delete mode 100644 test/philomena/mod_notes_test.exs delete mode 100644 test/philomena/notifications_test.exs delete mode 100644 test/philomena/poll_options_test.exs delete mode 100644 test/philomena/poll_votes_test.exs delete mode 100644 test/philomena/polls_test.exs delete mode 100644 test/philomena/posts_test.exs delete mode 100644 test/philomena/reports_test.exs delete mode 100644 test/philomena/roles_test.exs delete mode 100644 test/philomena/site_notices_test.exs delete mode 100644 test/philomena/source_changes_test.exs delete mode 100644 test/philomena/static_pages_test.exs delete mode 100644 test/philomena/tag_changes_test.exs delete mode 100644 test/philomena/tags_test.exs delete mode 100644 test/philomena/topics_test.exs delete mode 100644 test/philomena/user_fingerprints_test.exs delete mode 100644 test/philomena/user_ips_test.exs delete mode 100644 test/philomena/user_links_test.exs delete mode 100644 test/philomena/user_name_changes_test.exs delete mode 100644 test/philomena/user_statistics_test.exs delete mode 100644 test/philomena/user_whitelists_test.exs delete mode 100644 test/philomena/users_test.exs delete mode 100644 test/philomena/versions_test.exs delete mode 100644 test/philomena/vpns_test.exs delete mode 100644 test/philomena_web/controllers/channel_controller_test.exs delete mode 100644 test/philomena_web/controllers/comment_controller_test.exs delete mode 100644 test/philomena_web/controllers/dnp_entry_controller_test.exs delete mode 100644 test/philomena_web/controllers/duplicate_report_controller_test.exs delete mode 100644 test/philomena_web/controllers/image_controller_test.exs delete mode 100644 test/philomena_web/controllers/page_controller_test.exs delete mode 100644 test/philomena_web/controllers/setting_controller_test.exs delete mode 100644 test/philomena_web/controllers/staff_controller_test.exs delete mode 100644 test/philomena_web/controllers/stat_controller_test.exs delete mode 100644 test/philomena_web/controllers/tag_controller_test.exs delete mode 100644 test/philomena_web/controllers/user_link_controller_test.exs delete mode 100644 test/philomena_web/views/error_view_test.exs delete mode 100644 test/philomena_web/views/layout_view_test.exs delete mode 100644 test/philomena_web/views/page_view_test.exs diff --git a/test/philomena/adverts_test.exs b/test/philomena/adverts_test.exs deleted file mode 100644 index 375654a8..00000000 --- a/test/philomena/adverts_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.AdvertsTest do - use Philomena.DataCase - - alias Philomena.Adverts - - describe "adverts" do - alias Philomena.Adverts.Advert - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def advert_fixture(attrs \\ %{}) do - {:ok, advert} = - attrs - |> Enum.into(@valid_attrs) - |> Adverts.create_advert() - - advert - end - - test "list_adverts/0 returns all adverts" do - advert = advert_fixture() - assert Adverts.list_adverts() == [advert] - end - - test "get_advert!/1 returns the advert with given id" do - advert = advert_fixture() - assert Adverts.get_advert!(advert.id) == advert - end - - test "create_advert/1 with valid data creates a advert" do - assert {:ok, %Advert{} = advert} = Adverts.create_advert(@valid_attrs) - end - - test "create_advert/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Adverts.create_advert(@invalid_attrs) - end - - test "update_advert/2 with valid data updates the advert" do - advert = advert_fixture() - assert {:ok, %Advert{} = advert} = Adverts.update_advert(advert, @update_attrs) - end - - test "update_advert/2 with invalid data returns error changeset" do - advert = advert_fixture() - assert {:error, %Ecto.Changeset{}} = Adverts.update_advert(advert, @invalid_attrs) - assert advert == Adverts.get_advert!(advert.id) - end - - test "delete_advert/1 deletes the advert" do - advert = advert_fixture() - assert {:ok, %Advert{}} = Adverts.delete_advert(advert) - assert_raise Ecto.NoResultsError, fn -> Adverts.get_advert!(advert.id) end - end - - test "change_advert/1 returns a advert changeset" do - advert = advert_fixture() - assert %Ecto.Changeset{} = Adverts.change_advert(advert) - end - end -end diff --git a/test/philomena/badges_test.exs b/test/philomena/badges_test.exs deleted file mode 100644 index 72e9aed3..00000000 --- a/test/philomena/badges_test.exs +++ /dev/null @@ -1,121 +0,0 @@ -defmodule Philomena.BadgesTest do - use Philomena.DataCase - - alias Philomena.Badges - - describe "badges" do - alias Philomena.Badges.Badge - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def badge_fixture(attrs \\ %{}) do - {:ok, badge} = - attrs - |> Enum.into(@valid_attrs) - |> Badges.create_badge() - - badge - end - - test "list_badges/0 returns all badges" do - badge = badge_fixture() - assert Badges.list_badges() == [badge] - end - - test "get_badge!/1 returns the badge with given id" do - badge = badge_fixture() - assert Badges.get_badge!(badge.id) == badge - end - - test "create_badge/1 with valid data creates a badge" do - assert {:ok, %Badge{} = badge} = Badges.create_badge(@valid_attrs) - end - - test "create_badge/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Badges.create_badge(@invalid_attrs) - end - - test "update_badge/2 with valid data updates the badge" do - badge = badge_fixture() - assert {:ok, %Badge{} = badge} = Badges.update_badge(badge, @update_attrs) - end - - test "update_badge/2 with invalid data returns error changeset" do - badge = badge_fixture() - assert {:error, %Ecto.Changeset{}} = Badges.update_badge(badge, @invalid_attrs) - assert badge == Badges.get_badge!(badge.id) - end - - test "delete_badge/1 deletes the badge" do - badge = badge_fixture() - assert {:ok, %Badge{}} = Badges.delete_badge(badge) - assert_raise Ecto.NoResultsError, fn -> Badges.get_badge!(badge.id) end - end - - test "change_badge/1 returns a badge changeset" do - badge = badge_fixture() - assert %Ecto.Changeset{} = Badges.change_badge(badge) - end - end - - describe "badge_awards" do - alias Philomena.Badges.BadgeAward - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def badge_award_fixture(attrs \\ %{}) do - {:ok, badge_award} = - attrs - |> Enum.into(@valid_attrs) - |> Badges.create_badge_award() - - badge_award - end - - test "list_badge_awards/0 returns all badge_awards" do - badge_award = badge_award_fixture() - assert Badges.list_badge_awards() == [badge_award] - end - - test "get_badge_award!/1 returns the badge_award with given id" do - badge_award = badge_award_fixture() - assert Badges.get_badge_award!(badge_award.id) == badge_award - end - - test "create_badge_award/1 with valid data creates a badge_award" do - assert {:ok, %BadgeAward{} = badge_award} = Badges.create_badge_award(@valid_attrs) - end - - test "create_badge_award/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Badges.create_badge_award(@invalid_attrs) - end - - test "update_badge_award/2 with valid data updates the badge_award" do - badge_award = badge_award_fixture() - - assert {:ok, %BadgeAward{} = badge_award} = - Badges.update_badge_award(badge_award, @update_attrs) - end - - test "update_badge_award/2 with invalid data returns error changeset" do - badge_award = badge_award_fixture() - assert {:error, %Ecto.Changeset{}} = Badges.update_badge_award(badge_award, @invalid_attrs) - assert badge_award == Badges.get_badge_award!(badge_award.id) - end - - test "delete_badge_award/1 deletes the badge_award" do - badge_award = badge_award_fixture() - assert {:ok, %BadgeAward{}} = Badges.delete_badge_award(badge_award) - assert_raise Ecto.NoResultsError, fn -> Badges.get_badge_award!(badge_award.id) end - end - - test "change_badge_award/1 returns a badge_award changeset" do - badge_award = badge_award_fixture() - assert %Ecto.Changeset{} = Badges.change_badge_award(badge_award) - end - end -end diff --git a/test/philomena/bans_test.exs b/test/philomena/bans_test.exs deleted file mode 100644 index 7e725fff..00000000 --- a/test/philomena/bans_test.exs +++ /dev/null @@ -1,178 +0,0 @@ -defmodule Philomena.BansTest do - use Philomena.DataCase - - alias Philomena.Bans - - describe "fingerprint_bans" do - alias Philomena.Bans.Fingerprint - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fingerprint_fixture(attrs \\ %{}) do - {:ok, fingerprint} = - attrs - |> Enum.into(@valid_attrs) - |> Bans.create_fingerprint() - - fingerprint - end - - test "list_fingerprint_bans/0 returns all fingerprint_bans" do - fingerprint = fingerprint_fixture() - assert Bans.list_fingerprint_bans() == [fingerprint] - end - - test "get_fingerprint!/1 returns the fingerprint with given id" do - fingerprint = fingerprint_fixture() - assert Bans.get_fingerprint!(fingerprint.id) == fingerprint - end - - test "create_fingerprint/1 with valid data creates a fingerprint" do - assert {:ok, %Fingerprint{} = fingerprint} = Bans.create_fingerprint(@valid_attrs) - end - - test "create_fingerprint/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Bans.create_fingerprint(@invalid_attrs) - end - - test "update_fingerprint/2 with valid data updates the fingerprint" do - fingerprint = fingerprint_fixture() - - assert {:ok, %Fingerprint{} = fingerprint} = - Bans.update_fingerprint(fingerprint, @update_attrs) - end - - test "update_fingerprint/2 with invalid data returns error changeset" do - fingerprint = fingerprint_fixture() - assert {:error, %Ecto.Changeset{}} = Bans.update_fingerprint(fingerprint, @invalid_attrs) - assert fingerprint == Bans.get_fingerprint!(fingerprint.id) - end - - test "delete_fingerprint/1 deletes the fingerprint" do - fingerprint = fingerprint_fixture() - assert {:ok, %Fingerprint{}} = Bans.delete_fingerprint(fingerprint) - assert_raise Ecto.NoResultsError, fn -> Bans.get_fingerprint!(fingerprint.id) end - end - - test "change_fingerprint/1 returns a fingerprint changeset" do - fingerprint = fingerprint_fixture() - assert %Ecto.Changeset{} = Bans.change_fingerprint(fingerprint) - end - end - - describe "subnet_bans" do - alias Philomena.Bans.Subnet - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def subnet_fixture(attrs \\ %{}) do - {:ok, subnet} = - attrs - |> Enum.into(@valid_attrs) - |> Bans.create_subnet() - - subnet - end - - test "list_subnet_bans/0 returns all subnet_bans" do - subnet = subnet_fixture() - assert Bans.list_subnet_bans() == [subnet] - end - - test "get_subnet!/1 returns the subnet with given id" do - subnet = subnet_fixture() - assert Bans.get_subnet!(subnet.id) == subnet - end - - test "create_subnet/1 with valid data creates a subnet" do - assert {:ok, %Subnet{} = subnet} = Bans.create_subnet(@valid_attrs) - end - - test "create_subnet/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Bans.create_subnet(@invalid_attrs) - end - - test "update_subnet/2 with valid data updates the subnet" do - subnet = subnet_fixture() - assert {:ok, %Subnet{} = subnet} = Bans.update_subnet(subnet, @update_attrs) - end - - test "update_subnet/2 with invalid data returns error changeset" do - subnet = subnet_fixture() - assert {:error, %Ecto.Changeset{}} = Bans.update_subnet(subnet, @invalid_attrs) - assert subnet == Bans.get_subnet!(subnet.id) - end - - test "delete_subnet/1 deletes the subnet" do - subnet = subnet_fixture() - assert {:ok, %Subnet{}} = Bans.delete_subnet(subnet) - assert_raise Ecto.NoResultsError, fn -> Bans.get_subnet!(subnet.id) end - end - - test "change_subnet/1 returns a subnet changeset" do - subnet = subnet_fixture() - assert %Ecto.Changeset{} = Bans.change_subnet(subnet) - end - end - - describe "user_bans" do - alias Philomena.Bans.User - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_fixture(attrs \\ %{}) do - {:ok, user} = - attrs - |> Enum.into(@valid_attrs) - |> Bans.create_user() - - user - end - - test "list_user_bans/0 returns all user_bans" do - user = user_fixture() - assert Bans.list_user_bans() == [user] - end - - test "get_user!/1 returns the user with given id" do - user = user_fixture() - assert Bans.get_user!(user.id) == user - end - - test "create_user/1 with valid data creates a user" do - assert {:ok, %User{} = user} = Bans.create_user(@valid_attrs) - end - - test "create_user/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Bans.create_user(@invalid_attrs) - end - - test "update_user/2 with valid data updates the user" do - user = user_fixture() - assert {:ok, %User{} = user} = Bans.update_user(user, @update_attrs) - end - - test "update_user/2 with invalid data returns error changeset" do - user = user_fixture() - assert {:error, %Ecto.Changeset{}} = Bans.update_user(user, @invalid_attrs) - assert user == Bans.get_user!(user.id) - end - - test "delete_user/1 deletes the user" do - user = user_fixture() - assert {:ok, %User{}} = Bans.delete_user(user) - assert_raise Ecto.NoResultsError, fn -> Bans.get_user!(user.id) end - end - - test "change_user/1 returns a user changeset" do - user = user_fixture() - assert %Ecto.Changeset{} = Bans.change_user(user) - end - end -end diff --git a/test/philomena/channels_test.exs b/test/philomena/channels_test.exs deleted file mode 100644 index 52395052..00000000 --- a/test/philomena/channels_test.exs +++ /dev/null @@ -1,119 +0,0 @@ -defmodule Philomena.ChannelsTest do - use Philomena.DataCase - - alias Philomena.Channels - - describe "channels" do - alias Philomena.Channels.Channel - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def channel_fixture(attrs \\ %{}) do - {:ok, channel} = - attrs - |> Enum.into(@valid_attrs) - |> Channels.create_channel() - - channel - end - - test "list_channels/0 returns all channels" do - channel = channel_fixture() - assert Channels.list_channels() == [channel] - end - - test "get_channel!/1 returns the channel with given id" do - channel = channel_fixture() - assert Channels.get_channel!(channel.id) == channel - end - - test "create_channel/1 with valid data creates a channel" do - assert {:ok, %Channel{} = channel} = Channels.create_channel(@valid_attrs) - end - - test "create_channel/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Channels.create_channel(@invalid_attrs) - end - - test "update_channel/2 with valid data updates the channel" do - channel = channel_fixture() - assert {:ok, %Channel{} = channel} = Channels.update_channel(channel, @update_attrs) - end - - test "update_channel/2 with invalid data returns error changeset" do - channel = channel_fixture() - assert {:error, %Ecto.Changeset{}} = Channels.update_channel(channel, @invalid_attrs) - assert channel == Channels.get_channel!(channel.id) - end - - test "delete_channel/1 deletes the channel" do - channel = channel_fixture() - assert {:ok, %Channel{}} = Channels.delete_channel(channel) - assert_raise Ecto.NoResultsError, fn -> Channels.get_channel!(channel.id) end - end - - test "change_channel/1 returns a channel changeset" do - channel = channel_fixture() - assert %Ecto.Changeset{} = Channels.change_channel(channel) - end - end - - describe "channel_subscriptions" do - alias Philomena.Channels.Subscription - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def subscription_fixture(attrs \\ %{}) do - {:ok, subscription} = - attrs - |> Enum.into(@valid_attrs) - |> Channels.create_subscription() - - subscription - end - - test "list_channel_subscriptions/0 returns all channel_subscriptions" do - subscription = subscription_fixture() - assert Channels.list_channel_subscriptions() == [subscription] - end - - test "get_subscription!/1 returns the subscription with given id" do - subscription = subscription_fixture() - assert Channels.get_subscription!(subscription.id) == subscription - end - - test "create_subscription/1 with valid data creates a subscription" do - assert {:ok, %Subscription{} = subscription} = Channels.create_subscription(@valid_attrs) - end - - test "create_subscription/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Channels.create_subscription(@invalid_attrs) - end - - test "update_subscription/2 with valid data updates the subscription" do - subscription = subscription_fixture() - assert {:ok, %Subscription{} = subscription} = Channels.update_subscription(subscription, @update_attrs) - end - - test "update_subscription/2 with invalid data returns error changeset" do - subscription = subscription_fixture() - assert {:error, %Ecto.Changeset{}} = Channels.update_subscription(subscription, @invalid_attrs) - assert subscription == Channels.get_subscription!(subscription.id) - end - - test "delete_subscription/1 deletes the subscription" do - subscription = subscription_fixture() - assert {:ok, %Subscription{}} = Channels.delete_subscription(subscription) - assert_raise Ecto.NoResultsError, fn -> Channels.get_subscription!(subscription.id) end - end - - test "change_subscription/1 returns a subscription changeset" do - subscription = subscription_fixture() - assert %Ecto.Changeset{} = Channels.change_subscription(subscription) - end - end -end diff --git a/test/philomena/comments_test.exs b/test/philomena/comments_test.exs deleted file mode 100644 index 6f0b2fa3..00000000 --- a/test/philomena/comments_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.CommentsTest do - use Philomena.DataCase - - alias Philomena.Comments - - describe "comments" do - alias Philomena.Comments.Comment - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def comment_fixture(attrs \\ %{}) do - {:ok, comment} = - attrs - |> Enum.into(@valid_attrs) - |> Comments.create_comment() - - comment - end - - test "list_comments/0 returns all comments" do - comment = comment_fixture() - assert Comments.list_comments() == [comment] - end - - test "get_comment!/1 returns the comment with given id" do - comment = comment_fixture() - assert Comments.get_comment!(comment.id) == comment - end - - test "create_comment/1 with valid data creates a comment" do - assert {:ok, %Comment{} = comment} = Comments.create_comment(@valid_attrs) - end - - test "create_comment/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Comments.create_comment(@invalid_attrs) - end - - test "update_comment/2 with valid data updates the comment" do - comment = comment_fixture() - assert {:ok, %Comment{} = comment} = Comments.update_comment(comment, @update_attrs) - end - - test "update_comment/2 with invalid data returns error changeset" do - comment = comment_fixture() - assert {:error, %Ecto.Changeset{}} = Comments.update_comment(comment, @invalid_attrs) - assert comment == Comments.get_comment!(comment.id) - end - - test "delete_comment/1 deletes the comment" do - comment = comment_fixture() - assert {:ok, %Comment{}} = Comments.delete_comment(comment) - assert_raise Ecto.NoResultsError, fn -> Comments.get_comment!(comment.id) end - end - - test "change_comment/1 returns a comment changeset" do - comment = comment_fixture() - assert %Ecto.Changeset{} = Comments.change_comment(comment) - end - end -end diff --git a/test/philomena/commissions_test.exs b/test/philomena/commissions_test.exs deleted file mode 100644 index 030f59fe..00000000 --- a/test/philomena/commissions_test.exs +++ /dev/null @@ -1,124 +0,0 @@ -defmodule Philomena.CommissionsTest do - use Philomena.DataCase - - alias Philomena.Commissions - - describe "commissions" do - alias Philomena.Commissions.Commission - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def commission_fixture(attrs \\ %{}) do - {:ok, commission} = - attrs - |> Enum.into(@valid_attrs) - |> Commissions.create_commission() - - commission - end - - test "list_commissions/0 returns all commissions" do - commission = commission_fixture() - assert Commissions.list_commissions() == [commission] - end - - test "get_commission!/1 returns the commission with given id" do - commission = commission_fixture() - assert Commissions.get_commission!(commission.id) == commission - end - - test "create_commission/1 with valid data creates a commission" do - assert {:ok, %Commission{} = commission} = Commissions.create_commission(@valid_attrs) - end - - test "create_commission/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Commissions.create_commission(@invalid_attrs) - end - - test "update_commission/2 with valid data updates the commission" do - commission = commission_fixture() - - assert {:ok, %Commission{} = commission} = - Commissions.update_commission(commission, @update_attrs) - end - - test "update_commission/2 with invalid data returns error changeset" do - commission = commission_fixture() - - assert {:error, %Ecto.Changeset{}} = - Commissions.update_commission(commission, @invalid_attrs) - - assert commission == Commissions.get_commission!(commission.id) - end - - test "delete_commission/1 deletes the commission" do - commission = commission_fixture() - assert {:ok, %Commission{}} = Commissions.delete_commission(commission) - assert_raise Ecto.NoResultsError, fn -> Commissions.get_commission!(commission.id) end - end - - test "change_commission/1 returns a commission changeset" do - commission = commission_fixture() - assert %Ecto.Changeset{} = Commissions.change_commission(commission) - end - end - - describe "commission_items" do - alias Philomena.Commissions.Item - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def item_fixture(attrs \\ %{}) do - {:ok, item} = - attrs - |> Enum.into(@valid_attrs) - |> Commissions.create_item() - - item - end - - test "list_commission_items/0 returns all commission_items" do - item = item_fixture() - assert Commissions.list_commission_items() == [item] - end - - test "get_item!/1 returns the item with given id" do - item = item_fixture() - assert Commissions.get_item!(item.id) == item - end - - test "create_item/1 with valid data creates a item" do - assert {:ok, %Item{} = item} = Commissions.create_item(@valid_attrs) - end - - test "create_item/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Commissions.create_item(@invalid_attrs) - end - - test "update_item/2 with valid data updates the item" do - item = item_fixture() - assert {:ok, %Item{} = item} = Commissions.update_item(item, @update_attrs) - end - - test "update_item/2 with invalid data returns error changeset" do - item = item_fixture() - assert {:error, %Ecto.Changeset{}} = Commissions.update_item(item, @invalid_attrs) - assert item == Commissions.get_item!(item.id) - end - - test "delete_item/1 deletes the item" do - item = item_fixture() - assert {:ok, %Item{}} = Commissions.delete_item(item) - assert_raise Ecto.NoResultsError, fn -> Commissions.get_item!(item.id) end - end - - test "change_item/1 returns a item changeset" do - item = item_fixture() - assert %Ecto.Changeset{} = Commissions.change_item(item) - end - end -end diff --git a/test/philomena/conversations_test.exs b/test/philomena/conversations_test.exs deleted file mode 100644 index 1107c73d..00000000 --- a/test/philomena/conversations_test.exs +++ /dev/null @@ -1,125 +0,0 @@ -defmodule Philomena.ConversationsTest do - use Philomena.DataCase - - alias Philomena.Conversations - - describe "conversations" do - alias Philomena.Conversations.Conversation - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def conversation_fixture(attrs \\ %{}) do - {:ok, conversation} = - attrs - |> Enum.into(@valid_attrs) - |> Conversations.create_conversation() - - conversation - end - - test "list_conversations/0 returns all conversations" do - conversation = conversation_fixture() - assert Conversations.list_conversations() == [conversation] - end - - test "get_conversation!/1 returns the conversation with given id" do - conversation = conversation_fixture() - assert Conversations.get_conversation!(conversation.id) == conversation - end - - test "create_conversation/1 with valid data creates a conversation" do - assert {:ok, %Conversation{} = conversation} = - Conversations.create_conversation(@valid_attrs) - end - - test "create_conversation/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Conversations.create_conversation(@invalid_attrs) - end - - test "update_conversation/2 with valid data updates the conversation" do - conversation = conversation_fixture() - - assert {:ok, %Conversation{} = conversation} = - Conversations.update_conversation(conversation, @update_attrs) - end - - test "update_conversation/2 with invalid data returns error changeset" do - conversation = conversation_fixture() - - assert {:error, %Ecto.Changeset{}} = - Conversations.update_conversation(conversation, @invalid_attrs) - - assert conversation == Conversations.get_conversation!(conversation.id) - end - - test "delete_conversation/1 deletes the conversation" do - conversation = conversation_fixture() - assert {:ok, %Conversation{}} = Conversations.delete_conversation(conversation) - assert_raise Ecto.NoResultsError, fn -> Conversations.get_conversation!(conversation.id) end - end - - test "change_conversation/1 returns a conversation changeset" do - conversation = conversation_fixture() - assert %Ecto.Changeset{} = Conversations.change_conversation(conversation) - end - end - - describe "messages" do - alias Philomena.Conversations.Message - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def message_fixture(attrs \\ %{}) do - {:ok, message} = - attrs - |> Enum.into(@valid_attrs) - |> Conversations.create_message() - - message - end - - test "list_messages/0 returns all messages" do - message = message_fixture() - assert Conversations.list_messages() == [message] - end - - test "get_message!/1 returns the message with given id" do - message = message_fixture() - assert Conversations.get_message!(message.id) == message - end - - test "create_message/1 with valid data creates a message" do - assert {:ok, %Message{} = message} = Conversations.create_message(@valid_attrs) - end - - test "create_message/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Conversations.create_message(@invalid_attrs) - end - - test "update_message/2 with valid data updates the message" do - message = message_fixture() - assert {:ok, %Message{} = message} = Conversations.update_message(message, @update_attrs) - end - - test "update_message/2 with invalid data returns error changeset" do - message = message_fixture() - assert {:error, %Ecto.Changeset{}} = Conversations.update_message(message, @invalid_attrs) - assert message == Conversations.get_message!(message.id) - end - - test "delete_message/1 deletes the message" do - message = message_fixture() - assert {:ok, %Message{}} = Conversations.delete_message(message) - assert_raise Ecto.NoResultsError, fn -> Conversations.get_message!(message.id) end - end - - test "change_message/1 returns a message changeset" do - message = message_fixture() - assert %Ecto.Changeset{} = Conversations.change_message(message) - end - end -end diff --git a/test/philomena/dnp_entries_test.exs b/test/philomena/dnp_entries_test.exs deleted file mode 100644 index a0ad05c1..00000000 --- a/test/philomena/dnp_entries_test.exs +++ /dev/null @@ -1,64 +0,0 @@ -defmodule Philomena.DnpEntriesTest do - use Philomena.DataCase - - alias Philomena.DnpEntries - - describe "dnp_entries" do - alias Philomena.DnpEntries.DnpEntry - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def dnp_entry_fixture(attrs \\ %{}) do - {:ok, dnp_entry} = - attrs - |> Enum.into(@valid_attrs) - |> DnpEntries.create_dnp_entry() - - dnp_entry - end - - test "list_dnp_entries/0 returns all dnp_entries" do - dnp_entry = dnp_entry_fixture() - assert DnpEntries.list_dnp_entries() == [dnp_entry] - end - - test "get_dnp_entry!/1 returns the dnp_entry with given id" do - dnp_entry = dnp_entry_fixture() - assert DnpEntries.get_dnp_entry!(dnp_entry.id) == dnp_entry - end - - test "create_dnp_entry/1 with valid data creates a dnp_entry" do - assert {:ok, %DnpEntry{} = dnp_entry} = DnpEntries.create_dnp_entry(@valid_attrs) - end - - test "create_dnp_entry/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = DnpEntries.create_dnp_entry(@invalid_attrs) - end - - test "update_dnp_entry/2 with valid data updates the dnp_entry" do - dnp_entry = dnp_entry_fixture() - - assert {:ok, %DnpEntry{} = dnp_entry} = - DnpEntries.update_dnp_entry(dnp_entry, @update_attrs) - end - - test "update_dnp_entry/2 with invalid data returns error changeset" do - dnp_entry = dnp_entry_fixture() - assert {:error, %Ecto.Changeset{}} = DnpEntries.update_dnp_entry(dnp_entry, @invalid_attrs) - assert dnp_entry == DnpEntries.get_dnp_entry!(dnp_entry.id) - end - - test "delete_dnp_entry/1 deletes the dnp_entry" do - dnp_entry = dnp_entry_fixture() - assert {:ok, %DnpEntry{}} = DnpEntries.delete_dnp_entry(dnp_entry) - assert_raise Ecto.NoResultsError, fn -> DnpEntries.get_dnp_entry!(dnp_entry.id) end - end - - test "change_dnp_entry/1 returns a dnp_entry changeset" do - dnp_entry = dnp_entry_fixture() - assert %Ecto.Changeset{} = DnpEntries.change_dnp_entry(dnp_entry) - end - end -end diff --git a/test/philomena/donations_test.exs b/test/philomena/donations_test.exs deleted file mode 100644 index 541f471d..00000000 --- a/test/philomena/donations_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.DonationsTest do - use Philomena.DataCase - - alias Philomena.Donations - - describe "donations" do - alias Philomena.Donations.Donation - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def donation_fixture(attrs \\ %{}) do - {:ok, donation} = - attrs - |> Enum.into(@valid_attrs) - |> Donations.create_donation() - - donation - end - - test "list_donations/0 returns all donations" do - donation = donation_fixture() - assert Donations.list_donations() == [donation] - end - - test "get_donation!/1 returns the donation with given id" do - donation = donation_fixture() - assert Donations.get_donation!(donation.id) == donation - end - - test "create_donation/1 with valid data creates a donation" do - assert {:ok, %Donation{} = donation} = Donations.create_donation(@valid_attrs) - end - - test "create_donation/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Donations.create_donation(@invalid_attrs) - end - - test "update_donation/2 with valid data updates the donation" do - donation = donation_fixture() - assert {:ok, %Donation{} = donation} = Donations.update_donation(donation, @update_attrs) - end - - test "update_donation/2 with invalid data returns error changeset" do - donation = donation_fixture() - assert {:error, %Ecto.Changeset{}} = Donations.update_donation(donation, @invalid_attrs) - assert donation == Donations.get_donation!(donation.id) - end - - test "delete_donation/1 deletes the donation" do - donation = donation_fixture() - assert {:ok, %Donation{}} = Donations.delete_donation(donation) - assert_raise Ecto.NoResultsError, fn -> Donations.get_donation!(donation.id) end - end - - test "change_donation/1 returns a donation changeset" do - donation = donation_fixture() - assert %Ecto.Changeset{} = Donations.change_donation(donation) - end - end -end diff --git a/test/philomena/duplicate_reports_test.exs b/test/philomena/duplicate_reports_test.exs deleted file mode 100644 index c0f1ff9f..00000000 --- a/test/philomena/duplicate_reports_test.exs +++ /dev/null @@ -1,74 +0,0 @@ -defmodule Philomena.DuplicateReportsTest do - use Philomena.DataCase - - alias Philomena.DuplicateReports - - describe "duplicate_reports" do - alias Philomena.DuplicateReports.DuplicateReport - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def duplicate_report_fixture(attrs \\ %{}) do - {:ok, duplicate_report} = - attrs - |> Enum.into(@valid_attrs) - |> DuplicateReports.create_duplicate_report() - - duplicate_report - end - - test "list_duplicate_reports/0 returns all duplicate_reports" do - duplicate_report = duplicate_report_fixture() - assert DuplicateReports.list_duplicate_reports() == [duplicate_report] - end - - test "get_duplicate_report!/1 returns the duplicate_report with given id" do - duplicate_report = duplicate_report_fixture() - assert DuplicateReports.get_duplicate_report!(duplicate_report.id) == duplicate_report - end - - test "create_duplicate_report/1 with valid data creates a duplicate_report" do - assert {:ok, %DuplicateReport{} = duplicate_report} = - DuplicateReports.create_duplicate_report(@valid_attrs) - end - - test "create_duplicate_report/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = - DuplicateReports.create_duplicate_report(@invalid_attrs) - end - - test "update_duplicate_report/2 with valid data updates the duplicate_report" do - duplicate_report = duplicate_report_fixture() - - assert {:ok, %DuplicateReport{} = duplicate_report} = - DuplicateReports.update_duplicate_report(duplicate_report, @update_attrs) - end - - test "update_duplicate_report/2 with invalid data returns error changeset" do - duplicate_report = duplicate_report_fixture() - - assert {:error, %Ecto.Changeset{}} = - DuplicateReports.update_duplicate_report(duplicate_report, @invalid_attrs) - - assert duplicate_report == DuplicateReports.get_duplicate_report!(duplicate_report.id) - end - - test "delete_duplicate_report/1 deletes the duplicate_report" do - duplicate_report = duplicate_report_fixture() - - assert {:ok, %DuplicateReport{}} = - DuplicateReports.delete_duplicate_report(duplicate_report) - - assert_raise Ecto.NoResultsError, fn -> - DuplicateReports.get_duplicate_report!(duplicate_report.id) - end - end - - test "change_duplicate_report/1 returns a duplicate_report changeset" do - duplicate_report = duplicate_report_fixture() - assert %Ecto.Changeset{} = DuplicateReports.change_duplicate_report(duplicate_report) - end - end -end diff --git a/test/philomena/filters_test.exs b/test/philomena/filters_test.exs deleted file mode 100644 index 6bcd6bcf..00000000 --- a/test/philomena/filters_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.FiltersTest do - use Philomena.DataCase - - alias Philomena.Filters - - describe "filters" do - alias Philomena.Filters.Filter - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def filter_fixture(attrs \\ %{}) do - {:ok, filter} = - attrs - |> Enum.into(@valid_attrs) - |> Filters.create_filter() - - filter - end - - test "list_filters/0 returns all filters" do - filter = filter_fixture() - assert Filters.list_filters() == [filter] - end - - test "get_filter!/1 returns the filter with given id" do - filter = filter_fixture() - assert Filters.get_filter!(filter.id) == filter - end - - test "create_filter/1 with valid data creates a filter" do - assert {:ok, %Filter{} = filter} = Filters.create_filter(@valid_attrs) - end - - test "create_filter/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Filters.create_filter(@invalid_attrs) - end - - test "update_filter/2 with valid data updates the filter" do - filter = filter_fixture() - assert {:ok, %Filter{} = filter} = Filters.update_filter(filter, @update_attrs) - end - - test "update_filter/2 with invalid data returns error changeset" do - filter = filter_fixture() - assert {:error, %Ecto.Changeset{}} = Filters.update_filter(filter, @invalid_attrs) - assert filter == Filters.get_filter!(filter.id) - end - - test "delete_filter/1 deletes the filter" do - filter = filter_fixture() - assert {:ok, %Filter{}} = Filters.delete_filter(filter) - assert_raise Ecto.NoResultsError, fn -> Filters.get_filter!(filter.id) end - end - - test "change_filter/1 returns a filter changeset" do - filter = filter_fixture() - assert %Ecto.Changeset{} = Filters.change_filter(filter) - end - end -end diff --git a/test/philomena/forums_test.exs b/test/philomena/forums_test.exs deleted file mode 100644 index 3a03e017..00000000 --- a/test/philomena/forums_test.exs +++ /dev/null @@ -1,418 +0,0 @@ -defmodule Philomena.ForumsTest do - use Philomena.DataCase - - alias Philomena.Forums - - describe "forums" do - alias Philomena.Forums.Forum - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def forum_fixture(attrs \\ %{}) do - {:ok, forum} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_forum() - - forum - end - - test "list_forums/0 returns all forums" do - forum = forum_fixture() - assert Forums.list_forums() == [forum] - end - - test "get_forum!/1 returns the forum with given id" do - forum = forum_fixture() - assert Forums.get_forum!(forum.id) == forum - end - - test "create_forum/1 with valid data creates a forum" do - assert {:ok, %Forum{} = forum} = Forums.create_forum(@valid_attrs) - end - - test "create_forum/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_forum(@invalid_attrs) - end - - test "update_forum/2 with valid data updates the forum" do - forum = forum_fixture() - assert {:ok, %Forum{} = forum} = Forums.update_forum(forum, @update_attrs) - end - - test "update_forum/2 with invalid data returns error changeset" do - forum = forum_fixture() - assert {:error, %Ecto.Changeset{}} = Forums.update_forum(forum, @invalid_attrs) - assert forum == Forums.get_forum!(forum.id) - end - - test "delete_forum/1 deletes the forum" do - forum = forum_fixture() - assert {:ok, %Forum{}} = Forums.delete_forum(forum) - assert_raise Ecto.NoResultsError, fn -> Forums.get_forum!(forum.id) end - end - - test "change_forum/1 returns a forum changeset" do - forum = forum_fixture() - assert %Ecto.Changeset{} = Forums.change_forum(forum) - end - end - - describe "topics" do - alias Philomena.Forums.Topic - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def topic_fixture(attrs \\ %{}) do - {:ok, topic} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_topic() - - topic - end - - test "list_topics/0 returns all topics" do - topic = topic_fixture() - assert Forums.list_topics() == [topic] - end - - test "get_topic!/1 returns the topic with given id" do - topic = topic_fixture() - assert Forums.get_topic!(topic.id) == topic - end - - test "create_topic/1 with valid data creates a topic" do - assert {:ok, %Topic{} = topic} = Forums.create_topic(@valid_attrs) - end - - test "create_topic/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_topic(@invalid_attrs) - end - - test "update_topic/2 with valid data updates the topic" do - topic = topic_fixture() - assert {:ok, %Topic{} = topic} = Forums.update_topic(topic, @update_attrs) - end - - test "update_topic/2 with invalid data returns error changeset" do - topic = topic_fixture() - assert {:error, %Ecto.Changeset{}} = Forums.update_topic(topic, @invalid_attrs) - assert topic == Forums.get_topic!(topic.id) - end - - test "delete_topic/1 deletes the topic" do - topic = topic_fixture() - assert {:ok, %Topic{}} = Forums.delete_topic(topic) - assert_raise Ecto.NoResultsError, fn -> Forums.get_topic!(topic.id) end - end - - test "change_topic/1 returns a topic changeset" do - topic = topic_fixture() - assert %Ecto.Changeset{} = Forums.change_topic(topic) - end - end - - describe "posts" do - alias Philomena.Forums.Post - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def post_fixture(attrs \\ %{}) do - {:ok, post} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_post() - - post - end - - test "list_posts/0 returns all posts" do - post = post_fixture() - assert Forums.list_posts() == [post] - end - - test "get_post!/1 returns the post with given id" do - post = post_fixture() - assert Forums.get_post!(post.id) == post - end - - test "create_post/1 with valid data creates a post" do - assert {:ok, %Post{} = post} = Forums.create_post(@valid_attrs) - end - - test "create_post/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_post(@invalid_attrs) - end - - test "update_post/2 with valid data updates the post" do - post = post_fixture() - assert {:ok, %Post{} = post} = Forums.update_post(post, @update_attrs) - end - - test "update_post/2 with invalid data returns error changeset" do - post = post_fixture() - assert {:error, %Ecto.Changeset{}} = Forums.update_post(post, @invalid_attrs) - assert post == Forums.get_post!(post.id) - end - - test "delete_post/1 deletes the post" do - post = post_fixture() - assert {:ok, %Post{}} = Forums.delete_post(post) - assert_raise Ecto.NoResultsError, fn -> Forums.get_post!(post.id) end - end - - test "change_post/1 returns a post changeset" do - post = post_fixture() - assert %Ecto.Changeset{} = Forums.change_post(post) - end - end - - describe "forum_subscriptions" do - alias Philomena.Forums.Subscription - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def subscription_fixture(attrs \\ %{}) do - {:ok, subscription} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_subscription() - - subscription - end - - test "list_forum_subscriptions/0 returns all forum_subscriptions" do - subscription = subscription_fixture() - assert Forums.list_forum_subscriptions() == [subscription] - end - - test "get_subscription!/1 returns the subscription with given id" do - subscription = subscription_fixture() - assert Forums.get_subscription!(subscription.id) == subscription - end - - test "create_subscription/1 with valid data creates a subscription" do - assert {:ok, %Subscription{} = subscription} = Forums.create_subscription(@valid_attrs) - end - - test "create_subscription/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_subscription(@invalid_attrs) - end - - test "update_subscription/2 with valid data updates the subscription" do - subscription = subscription_fixture() - - assert {:ok, %Subscription{} = subscription} = - Forums.update_subscription(subscription, @update_attrs) - end - - test "update_subscription/2 with invalid data returns error changeset" do - subscription = subscription_fixture() - - assert {:error, %Ecto.Changeset{}} = - Forums.update_subscription(subscription, @invalid_attrs) - - assert subscription == Forums.get_subscription!(subscription.id) - end - - test "delete_subscription/1 deletes the subscription" do - subscription = subscription_fixture() - assert {:ok, %Subscription{}} = Forums.delete_subscription(subscription) - assert_raise Ecto.NoResultsError, fn -> Forums.get_subscription!(subscription.id) end - end - - test "change_subscription/1 returns a subscription changeset" do - subscription = subscription_fixture() - assert %Ecto.Changeset{} = Forums.change_subscription(subscription) - end - end - - describe "polls" do - alias Philomena.Forums.Polls - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def polls_fixture(attrs \\ %{}) do - {:ok, polls} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_polls() - - polls - end - - test "list_polls/0 returns all polls" do - polls = polls_fixture() - assert Forums.list_polls() == [polls] - end - - test "get_polls!/1 returns the polls with given id" do - polls = polls_fixture() - assert Forums.get_polls!(polls.id) == polls - end - - test "create_polls/1 with valid data creates a polls" do - assert {:ok, %Polls{} = polls} = Forums.create_polls(@valid_attrs) - end - - test "create_polls/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_polls(@invalid_attrs) - end - - test "update_polls/2 with valid data updates the polls" do - polls = polls_fixture() - assert {:ok, %Polls{} = polls} = Forums.update_polls(polls, @update_attrs) - end - - test "update_polls/2 with invalid data returns error changeset" do - polls = polls_fixture() - assert {:error, %Ecto.Changeset{}} = Forums.update_polls(polls, @invalid_attrs) - assert polls == Forums.get_polls!(polls.id) - end - - test "delete_polls/1 deletes the polls" do - polls = polls_fixture() - assert {:ok, %Polls{}} = Forums.delete_polls(polls) - assert_raise Ecto.NoResultsError, fn -> Forums.get_polls!(polls.id) end - end - - test "change_polls/1 returns a polls changeset" do - polls = polls_fixture() - assert %Ecto.Changeset{} = Forums.change_polls(polls) - end - end - - describe "poll_votes" do - alias Philomena.Forums.PollVote - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def poll_vote_fixture(attrs \\ %{}) do - {:ok, poll_vote} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_poll_vote() - - poll_vote - end - - test "list_poll_votes/0 returns all poll_votes" do - poll_vote = poll_vote_fixture() - assert Forums.list_poll_votes() == [poll_vote] - end - - test "get_poll_vote!/1 returns the poll_vote with given id" do - poll_vote = poll_vote_fixture() - assert Forums.get_poll_vote!(poll_vote.id) == poll_vote - end - - test "create_poll_vote/1 with valid data creates a poll_vote" do - assert {:ok, %PollVote{} = poll_vote} = Forums.create_poll_vote(@valid_attrs) - end - - test "create_poll_vote/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_poll_vote(@invalid_attrs) - end - - test "update_poll_vote/2 with valid data updates the poll_vote" do - poll_vote = poll_vote_fixture() - assert {:ok, %PollVote{} = poll_vote} = Forums.update_poll_vote(poll_vote, @update_attrs) - end - - test "update_poll_vote/2 with invalid data returns error changeset" do - poll_vote = poll_vote_fixture() - assert {:error, %Ecto.Changeset{}} = Forums.update_poll_vote(poll_vote, @invalid_attrs) - assert poll_vote == Forums.get_poll_vote!(poll_vote.id) - end - - test "delete_poll_vote/1 deletes the poll_vote" do - poll_vote = poll_vote_fixture() - assert {:ok, %PollVote{}} = Forums.delete_poll_vote(poll_vote) - assert_raise Ecto.NoResultsError, fn -> Forums.get_poll_vote!(poll_vote.id) end - end - - test "change_poll_vote/1 returns a poll_vote changeset" do - poll_vote = poll_vote_fixture() - assert %Ecto.Changeset{} = Forums.change_poll_vote(poll_vote) - end - end - - describe "topic_subscriptions" do - alias Philomena.Forums.TopicSubscription - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def topic_subscription_fixture(attrs \\ %{}) do - {:ok, topic_subscription} = - attrs - |> Enum.into(@valid_attrs) - |> Forums.create_topic_subscription() - - topic_subscription - end - - test "list_topic_subscriptions/0 returns all topic_subscriptions" do - topic_subscription = topic_subscription_fixture() - assert Forums.list_topic_subscriptions() == [topic_subscription] - end - - test "get_topic_subscription!/1 returns the topic_subscription with given id" do - topic_subscription = topic_subscription_fixture() - assert Forums.get_topic_subscription!(topic_subscription.id) == topic_subscription - end - - test "create_topic_subscription/1 with valid data creates a topic_subscription" do - assert {:ok, %TopicSubscription{} = topic_subscription} = - Forums.create_topic_subscription(@valid_attrs) - end - - test "create_topic_subscription/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Forums.create_topic_subscription(@invalid_attrs) - end - - test "update_topic_subscription/2 with valid data updates the topic_subscription" do - topic_subscription = topic_subscription_fixture() - - assert {:ok, %TopicSubscription{} = topic_subscription} = - Forums.update_topic_subscription(topic_subscription, @update_attrs) - end - - test "update_topic_subscription/2 with invalid data returns error changeset" do - topic_subscription = topic_subscription_fixture() - - assert {:error, %Ecto.Changeset{}} = - Forums.update_topic_subscription(topic_subscription, @invalid_attrs) - - assert topic_subscription == Forums.get_topic_subscription!(topic_subscription.id) - end - - test "delete_topic_subscription/1 deletes the topic_subscription" do - topic_subscription = topic_subscription_fixture() - assert {:ok, %TopicSubscription{}} = Forums.delete_topic_subscription(topic_subscription) - - assert_raise Ecto.NoResultsError, fn -> - Forums.get_topic_subscription!(topic_subscription.id) - end - end - - test "change_topic_subscription/1 returns a topic_subscription changeset" do - topic_subscription = topic_subscription_fixture() - assert %Ecto.Changeset{} = Forums.change_topic_subscription(topic_subscription) - end - end -end diff --git a/test/philomena/galleries_test.exs b/test/philomena/galleries_test.exs deleted file mode 100644 index 68f78640..00000000 --- a/test/philomena/galleries_test.exs +++ /dev/null @@ -1,124 +0,0 @@ -defmodule Philomena.GalleriesTest do - use Philomena.DataCase - - alias Philomena.Galleries - - describe "galleries" do - alias Philomena.Galleries.Gallery - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def gallery_fixture(attrs \\ %{}) do - {:ok, gallery} = - attrs - |> Enum.into(@valid_attrs) - |> Galleries.create_gallery() - - gallery - end - - test "list_galleries/0 returns all galleries" do - gallery = gallery_fixture() - assert Galleries.list_galleries() == [gallery] - end - - test "get_gallery!/1 returns the gallery with given id" do - gallery = gallery_fixture() - assert Galleries.get_gallery!(gallery.id) == gallery - end - - test "create_gallery/1 with valid data creates a gallery" do - assert {:ok, %Gallery{} = gallery} = Galleries.create_gallery(@valid_attrs) - end - - test "create_gallery/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Galleries.create_gallery(@invalid_attrs) - end - - test "update_gallery/2 with valid data updates the gallery" do - gallery = gallery_fixture() - assert {:ok, %Gallery{} = gallery} = Galleries.update_gallery(gallery, @update_attrs) - end - - test "update_gallery/2 with invalid data returns error changeset" do - gallery = gallery_fixture() - assert {:error, %Ecto.Changeset{}} = Galleries.update_gallery(gallery, @invalid_attrs) - assert gallery == Galleries.get_gallery!(gallery.id) - end - - test "delete_gallery/1 deletes the gallery" do - gallery = gallery_fixture() - assert {:ok, %Gallery{}} = Galleries.delete_gallery(gallery) - assert_raise Ecto.NoResultsError, fn -> Galleries.get_gallery!(gallery.id) end - end - - test "change_gallery/1 returns a gallery changeset" do - gallery = gallery_fixture() - assert %Ecto.Changeset{} = Galleries.change_gallery(gallery) - end - end - - describe "gallery_subscriptions" do - alias Philomena.Galleries.Subscription - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def subscription_fixture(attrs \\ %{}) do - {:ok, subscription} = - attrs - |> Enum.into(@valid_attrs) - |> Galleries.create_subscription() - - subscription - end - - test "list_gallery_subscriptions/0 returns all gallery_subscriptions" do - subscription = subscription_fixture() - assert Galleries.list_gallery_subscriptions() == [subscription] - end - - test "get_subscription!/1 returns the subscription with given id" do - subscription = subscription_fixture() - assert Galleries.get_subscription!(subscription.id) == subscription - end - - test "create_subscription/1 with valid data creates a subscription" do - assert {:ok, %Subscription{} = subscription} = Galleries.create_subscription(@valid_attrs) - end - - test "create_subscription/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Galleries.create_subscription(@invalid_attrs) - end - - test "update_subscription/2 with valid data updates the subscription" do - subscription = subscription_fixture() - - assert {:ok, %Subscription{} = subscription} = - Galleries.update_subscription(subscription, @update_attrs) - end - - test "update_subscription/2 with invalid data returns error changeset" do - subscription = subscription_fixture() - - assert {:error, %Ecto.Changeset{}} = - Galleries.update_subscription(subscription, @invalid_attrs) - - assert subscription == Galleries.get_subscription!(subscription.id) - end - - test "delete_subscription/1 deletes the subscription" do - subscription = subscription_fixture() - assert {:ok, %Subscription{}} = Galleries.delete_subscription(subscription) - assert_raise Ecto.NoResultsError, fn -> Galleries.get_subscription!(subscription.id) end - end - - test "change_subscription/1 returns a subscription changeset" do - subscription = subscription_fixture() - assert %Ecto.Changeset{} = Galleries.change_subscription(subscription) - end - end -end diff --git a/test/philomena/image_faves_test.exs b/test/philomena/image_faves_test.exs deleted file mode 100644 index 0cd990d2..00000000 --- a/test/philomena/image_faves_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ImageFavesTest do - use Philomena.DataCase - - alias Philomena.ImageFaves - - describe "image_faves" do - alias Philomena.ImageFaves.ImageFave - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def image_fave_fixture(attrs \\ %{}) do - {:ok, image_fave} = - attrs - |> Enum.into(@valid_attrs) - |> ImageFaves.create_image_fave() - - image_fave - end - - test "list_image_faves/0 returns all image_faves" do - image_fave = image_fave_fixture() - assert ImageFaves.list_image_faves() == [image_fave] - end - - test "get_image_fave!/1 returns the image_fave with given id" do - image_fave = image_fave_fixture() - assert ImageFaves.get_image_fave!(image_fave.id) == image_fave - end - - test "create_image_fave/1 with valid data creates a image_fave" do - assert {:ok, %ImageFave{} = image_fave} = ImageFaves.create_image_fave(@valid_attrs) - end - - test "create_image_fave/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = ImageFaves.create_image_fave(@invalid_attrs) - end - - test "update_image_fave/2 with valid data updates the image_fave" do - image_fave = image_fave_fixture() - assert {:ok, %ImageFave{} = image_fave} = ImageFaves.update_image_fave(image_fave, @update_attrs) - end - - test "update_image_fave/2 with invalid data returns error changeset" do - image_fave = image_fave_fixture() - assert {:error, %Ecto.Changeset{}} = ImageFaves.update_image_fave(image_fave, @invalid_attrs) - assert image_fave == ImageFaves.get_image_fave!(image_fave.id) - end - - test "delete_image_fave/1 deletes the image_fave" do - image_fave = image_fave_fixture() - assert {:ok, %ImageFave{}} = ImageFaves.delete_image_fave(image_fave) - assert_raise Ecto.NoResultsError, fn -> ImageFaves.get_image_fave!(image_fave.id) end - end - - test "change_image_fave/1 returns a image_fave changeset" do - image_fave = image_fave_fixture() - assert %Ecto.Changeset{} = ImageFaves.change_image_fave(image_fave) - end - end -end diff --git a/test/philomena/image_features_test.exs b/test/philomena/image_features_test.exs deleted file mode 100644 index c208f497..00000000 --- a/test/philomena/image_features_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ImageFeaturesTest do - use Philomena.DataCase - - alias Philomena.ImageFeatures - - describe "image_features" do - alias Philomena.ImageFeatures.ImageFeature - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def image_feature_fixture(attrs \\ %{}) do - {:ok, image_feature} = - attrs - |> Enum.into(@valid_attrs) - |> ImageFeatures.create_image_feature() - - image_feature - end - - test "list_image_features/0 returns all image_features" do - image_feature = image_feature_fixture() - assert ImageFeatures.list_image_features() == [image_feature] - end - - test "get_image_feature!/1 returns the image_feature with given id" do - image_feature = image_feature_fixture() - assert ImageFeatures.get_image_feature!(image_feature.id) == image_feature - end - - test "create_image_feature/1 with valid data creates a image_feature" do - assert {:ok, %ImageFeature{} = image_feature} = ImageFeatures.create_image_feature(@valid_attrs) - end - - test "create_image_feature/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = ImageFeatures.create_image_feature(@invalid_attrs) - end - - test "update_image_feature/2 with valid data updates the image_feature" do - image_feature = image_feature_fixture() - assert {:ok, %ImageFeature{} = image_feature} = ImageFeatures.update_image_feature(image_feature, @update_attrs) - end - - test "update_image_feature/2 with invalid data returns error changeset" do - image_feature = image_feature_fixture() - assert {:error, %Ecto.Changeset{}} = ImageFeatures.update_image_feature(image_feature, @invalid_attrs) - assert image_feature == ImageFeatures.get_image_feature!(image_feature.id) - end - - test "delete_image_feature/1 deletes the image_feature" do - image_feature = image_feature_fixture() - assert {:ok, %ImageFeature{}} = ImageFeatures.delete_image_feature(image_feature) - assert_raise Ecto.NoResultsError, fn -> ImageFeatures.get_image_feature!(image_feature.id) end - end - - test "change_image_feature/1 returns a image_feature changeset" do - image_feature = image_feature_fixture() - assert %Ecto.Changeset{} = ImageFeatures.change_image_feature(image_feature) - end - end -end diff --git a/test/philomena/image_hides_test.exs b/test/philomena/image_hides_test.exs deleted file mode 100644 index 77a66b17..00000000 --- a/test/philomena/image_hides_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ImageHidesTest do - use Philomena.DataCase - - alias Philomena.ImageHides - - describe "image_hides" do - alias Philomena.ImageHides.ImageHide - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def image_hide_fixture(attrs \\ %{}) do - {:ok, image_hide} = - attrs - |> Enum.into(@valid_attrs) - |> ImageHides.create_image_hide() - - image_hide - end - - test "list_image_hides/0 returns all image_hides" do - image_hide = image_hide_fixture() - assert ImageHides.list_image_hides() == [image_hide] - end - - test "get_image_hide!/1 returns the image_hide with given id" do - image_hide = image_hide_fixture() - assert ImageHides.get_image_hide!(image_hide.id) == image_hide - end - - test "create_image_hide/1 with valid data creates a image_hide" do - assert {:ok, %ImageHide{} = image_hide} = ImageHides.create_image_hide(@valid_attrs) - end - - test "create_image_hide/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = ImageHides.create_image_hide(@invalid_attrs) - end - - test "update_image_hide/2 with valid data updates the image_hide" do - image_hide = image_hide_fixture() - assert {:ok, %ImageHide{} = image_hide} = ImageHides.update_image_hide(image_hide, @update_attrs) - end - - test "update_image_hide/2 with invalid data returns error changeset" do - image_hide = image_hide_fixture() - assert {:error, %Ecto.Changeset{}} = ImageHides.update_image_hide(image_hide, @invalid_attrs) - assert image_hide == ImageHides.get_image_hide!(image_hide.id) - end - - test "delete_image_hide/1 deletes the image_hide" do - image_hide = image_hide_fixture() - assert {:ok, %ImageHide{}} = ImageHides.delete_image_hide(image_hide) - assert_raise Ecto.NoResultsError, fn -> ImageHides.get_image_hide!(image_hide.id) end - end - - test "change_image_hide/1 returns a image_hide changeset" do - image_hide = image_hide_fixture() - assert %Ecto.Changeset{} = ImageHides.change_image_hide(image_hide) - end - end -end diff --git a/test/philomena/image_intensities_test.exs b/test/philomena/image_intensities_test.exs deleted file mode 100644 index f65480ad..00000000 --- a/test/philomena/image_intensities_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ImageIntensitiesTest do - use Philomena.DataCase - - alias Philomena.ImageIntensities - - describe "image_intensities" do - alias Philomena.ImageIntensities.ImageIntensity - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def image_intensity_fixture(attrs \\ %{}) do - {:ok, image_intensity} = - attrs - |> Enum.into(@valid_attrs) - |> ImageIntensities.create_image_intensity() - - image_intensity - end - - test "list_image_intensities/0 returns all image_intensities" do - image_intensity = image_intensity_fixture() - assert ImageIntensities.list_image_intensities() == [image_intensity] - end - - test "get_image_intensity!/1 returns the image_intensity with given id" do - image_intensity = image_intensity_fixture() - assert ImageIntensities.get_image_intensity!(image_intensity.id) == image_intensity - end - - test "create_image_intensity/1 with valid data creates a image_intensity" do - assert {:ok, %ImageIntensity{} = image_intensity} = ImageIntensities.create_image_intensity(@valid_attrs) - end - - test "create_image_intensity/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = ImageIntensities.create_image_intensity(@invalid_attrs) - end - - test "update_image_intensity/2 with valid data updates the image_intensity" do - image_intensity = image_intensity_fixture() - assert {:ok, %ImageIntensity{} = image_intensity} = ImageIntensities.update_image_intensity(image_intensity, @update_attrs) - end - - test "update_image_intensity/2 with invalid data returns error changeset" do - image_intensity = image_intensity_fixture() - assert {:error, %Ecto.Changeset{}} = ImageIntensities.update_image_intensity(image_intensity, @invalid_attrs) - assert image_intensity == ImageIntensities.get_image_intensity!(image_intensity.id) - end - - test "delete_image_intensity/1 deletes the image_intensity" do - image_intensity = image_intensity_fixture() - assert {:ok, %ImageIntensity{}} = ImageIntensities.delete_image_intensity(image_intensity) - assert_raise Ecto.NoResultsError, fn -> ImageIntensities.get_image_intensity!(image_intensity.id) end - end - - test "change_image_intensity/1 returns a image_intensity changeset" do - image_intensity = image_intensity_fixture() - assert %Ecto.Changeset{} = ImageIntensities.change_image_intensity(image_intensity) - end - end -end diff --git a/test/philomena/image_votes_test.exs b/test/philomena/image_votes_test.exs deleted file mode 100644 index 8866840f..00000000 --- a/test/philomena/image_votes_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ImageVotesTest do - use Philomena.DataCase - - alias Philomena.ImageVotes - - describe "image_votes" do - alias Philomena.ImageVotes.ImageVote - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def image_vote_fixture(attrs \\ %{}) do - {:ok, image_vote} = - attrs - |> Enum.into(@valid_attrs) - |> ImageVotes.create_image_vote() - - image_vote - end - - test "list_image_votes/0 returns all image_votes" do - image_vote = image_vote_fixture() - assert ImageVotes.list_image_votes() == [image_vote] - end - - test "get_image_vote!/1 returns the image_vote with given id" do - image_vote = image_vote_fixture() - assert ImageVotes.get_image_vote!(image_vote.id) == image_vote - end - - test "create_image_vote/1 with valid data creates a image_vote" do - assert {:ok, %ImageVote{} = image_vote} = ImageVotes.create_image_vote(@valid_attrs) - end - - test "create_image_vote/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = ImageVotes.create_image_vote(@invalid_attrs) - end - - test "update_image_vote/2 with valid data updates the image_vote" do - image_vote = image_vote_fixture() - assert {:ok, %ImageVote{} = image_vote} = ImageVotes.update_image_vote(image_vote, @update_attrs) - end - - test "update_image_vote/2 with invalid data returns error changeset" do - image_vote = image_vote_fixture() - assert {:error, %Ecto.Changeset{}} = ImageVotes.update_image_vote(image_vote, @invalid_attrs) - assert image_vote == ImageVotes.get_image_vote!(image_vote.id) - end - - test "delete_image_vote/1 deletes the image_vote" do - image_vote = image_vote_fixture() - assert {:ok, %ImageVote{}} = ImageVotes.delete_image_vote(image_vote) - assert_raise Ecto.NoResultsError, fn -> ImageVotes.get_image_vote!(image_vote.id) end - end - - test "change_image_vote/1 returns a image_vote changeset" do - image_vote = image_vote_fixture() - assert %Ecto.Changeset{} = ImageVotes.change_image_vote(image_vote) - end - end -end diff --git a/test/philomena/images_test.exs b/test/philomena/images_test.exs deleted file mode 100644 index 186f65ad..00000000 --- a/test/philomena/images_test.exs +++ /dev/null @@ -1,361 +0,0 @@ -defmodule Philomena.ImagesTest do - use Philomena.DataCase - - alias Philomena.Images - - describe "images" do - alias Philomena.Images.Image - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def image_fixture(attrs \\ %{}) do - {:ok, image} = - attrs - |> Enum.into(@valid_attrs) - |> Images.create_image() - - image - end - - test "list_images/0 returns all images" do - image = image_fixture() - assert Images.list_images() == [image] - end - - test "get_image!/1 returns the image with given id" do - image = image_fixture() - assert Images.get_image!(image.id) == image - end - - test "create_image/1 with valid data creates a image" do - assert {:ok, %Image{} = image} = Images.create_image(@valid_attrs) - end - - test "create_image/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Images.create_image(@invalid_attrs) - end - - test "update_image/2 with valid data updates the image" do - image = image_fixture() - assert {:ok, %Image{} = image} = Images.update_image(image, @update_attrs) - end - - test "update_image/2 with invalid data returns error changeset" do - image = image_fixture() - assert {:error, %Ecto.Changeset{}} = Images.update_image(image, @invalid_attrs) - assert image == Images.get_image!(image.id) - end - - test "delete_image/1 deletes the image" do - image = image_fixture() - assert {:ok, %Image{}} = Images.delete_image(image) - assert_raise Ecto.NoResultsError, fn -> Images.get_image!(image.id) end - end - - test "change_image/1 returns a image changeset" do - image = image_fixture() - assert %Ecto.Changeset{} = Images.change_image(image) - end - end - - describe "image_features" do - alias Philomena.Images.Features - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def features_fixture(attrs \\ %{}) do - {:ok, features} = - attrs - |> Enum.into(@valid_attrs) - |> Images.create_features() - - features - end - - test "list_image_features/0 returns all image_features" do - features = features_fixture() - assert Images.list_image_features() == [features] - end - - test "get_features!/1 returns the features with given id" do - features = features_fixture() - assert Images.get_features!(features.id) == features - end - - test "create_features/1 with valid data creates a features" do - assert {:ok, %Features{} = features} = Images.create_features(@valid_attrs) - end - - test "create_features/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Images.create_features(@invalid_attrs) - end - - test "update_features/2 with valid data updates the features" do - features = features_fixture() - assert {:ok, %Features{} = features} = Images.update_features(features, @update_attrs) - end - - test "update_features/2 with invalid data returns error changeset" do - features = features_fixture() - assert {:error, %Ecto.Changeset{}} = Images.update_features(features, @invalid_attrs) - assert features == Images.get_features!(features.id) - end - - test "delete_features/1 deletes the features" do - features = features_fixture() - assert {:ok, %Features{}} = Images.delete_features(features) - assert_raise Ecto.NoResultsError, fn -> Images.get_features!(features.id) end - end - - test "change_features/1 returns a features changeset" do - features = features_fixture() - assert %Ecto.Changeset{} = Images.change_features(features) - end - end - - describe "image_intensities" do - alias Philomena.Images.Intensities - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def intensities_fixture(attrs \\ %{}) do - {:ok, intensities} = - attrs - |> Enum.into(@valid_attrs) - |> Images.create_intensities() - - intensities - end - - test "list_image_intensities/0 returns all image_intensities" do - intensities = intensities_fixture() - assert Images.list_image_intensities() == [intensities] - end - - test "get_intensities!/1 returns the intensities with given id" do - intensities = intensities_fixture() - assert Images.get_intensities!(intensities.id) == intensities - end - - test "create_intensities/1 with valid data creates a intensities" do - assert {:ok, %Intensities{} = intensities} = Images.create_intensities(@valid_attrs) - end - - test "create_intensities/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Images.create_intensities(@invalid_attrs) - end - - test "update_intensities/2 with valid data updates the intensities" do - intensities = intensities_fixture() - - assert {:ok, %Intensities{} = intensities} = - Images.update_intensities(intensities, @update_attrs) - end - - test "update_intensities/2 with invalid data returns error changeset" do - intensities = intensities_fixture() - assert {:error, %Ecto.Changeset{}} = Images.update_intensities(intensities, @invalid_attrs) - assert intensities == Images.get_intensities!(intensities.id) - end - - test "delete_intensities/1 deletes the intensities" do - intensities = intensities_fixture() - assert {:ok, %Intensities{}} = Images.delete_intensities(intensities) - assert_raise Ecto.NoResultsError, fn -> Images.get_intensities!(intensities.id) end - end - - test "change_intensities/1 returns a intensities changeset" do - intensities = intensities_fixture() - assert %Ecto.Changeset{} = Images.change_intensities(intensities) - end - end - - describe "image_subscriptions" do - alias Philomena.Images.Subscription - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def subscription_fixture(attrs \\ %{}) do - {:ok, subscription} = - attrs - |> Enum.into(@valid_attrs) - |> Images.create_subscription() - - subscription - end - - test "list_image_subscriptions/0 returns all image_subscriptions" do - subscription = subscription_fixture() - assert Images.list_image_subscriptions() == [subscription] - end - - test "get_subscription!/1 returns the subscription with given id" do - subscription = subscription_fixture() - assert Images.get_subscription!(subscription.id) == subscription - end - - test "create_subscription/1 with valid data creates a subscription" do - assert {:ok, %Subscription{} = subscription} = Images.create_subscription(@valid_attrs) - end - - test "create_subscription/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Images.create_subscription(@invalid_attrs) - end - - test "update_subscription/2 with valid data updates the subscription" do - subscription = subscription_fixture() - - assert {:ok, %Subscription{} = subscription} = - Images.update_subscription(subscription, @update_attrs) - end - - test "update_subscription/2 with invalid data returns error changeset" do - subscription = subscription_fixture() - - assert {:error, %Ecto.Changeset{}} = - Images.update_subscription(subscription, @invalid_attrs) - - assert subscription == Images.get_subscription!(subscription.id) - end - - test "delete_subscription/1 deletes the subscription" do - subscription = subscription_fixture() - assert {:ok, %Subscription{}} = Images.delete_subscription(subscription) - assert_raise Ecto.NoResultsError, fn -> Images.get_subscription!(subscription.id) end - end - - test "change_subscription/1 returns a subscription changeset" do - subscription = subscription_fixture() - assert %Ecto.Changeset{} = Images.change_subscription(subscription) - end - end - - describe "source_changes" do - alias Philomena.Images.SourceChange - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def source_change_fixture(attrs \\ %{}) do - {:ok, source_change} = - attrs - |> Enum.into(@valid_attrs) - |> Images.create_source_change() - - source_change - end - - test "list_source_changes/0 returns all source_changes" do - source_change = source_change_fixture() - assert Images.list_source_changes() == [source_change] - end - - test "get_source_change!/1 returns the source_change with given id" do - source_change = source_change_fixture() - assert Images.get_source_change!(source_change.id) == source_change - end - - test "create_source_change/1 with valid data creates a source_change" do - assert {:ok, %SourceChange{} = source_change} = Images.create_source_change(@valid_attrs) - end - - test "create_source_change/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Images.create_source_change(@invalid_attrs) - end - - test "update_source_change/2 with valid data updates the source_change" do - source_change = source_change_fixture() - - assert {:ok, %SourceChange{} = source_change} = - Images.update_source_change(source_change, @update_attrs) - end - - test "update_source_change/2 with invalid data returns error changeset" do - source_change = source_change_fixture() - - assert {:error, %Ecto.Changeset{}} = - Images.update_source_change(source_change, @invalid_attrs) - - assert source_change == Images.get_source_change!(source_change.id) - end - - test "delete_source_change/1 deletes the source_change" do - source_change = source_change_fixture() - assert {:ok, %SourceChange{}} = Images.delete_source_change(source_change) - assert_raise Ecto.NoResultsError, fn -> Images.get_source_change!(source_change.id) end - end - - test "change_source_change/1 returns a source_change changeset" do - source_change = source_change_fixture() - assert %Ecto.Changeset{} = Images.change_source_change(source_change) - end - end - - describe "tag_changes" do - alias Philomena.Images.TagChange - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def tag_change_fixture(attrs \\ %{}) do - {:ok, tag_change} = - attrs - |> Enum.into(@valid_attrs) - |> Images.create_tag_change() - - tag_change - end - - test "list_tag_changes/0 returns all tag_changes" do - tag_change = tag_change_fixture() - assert Images.list_tag_changes() == [tag_change] - end - - test "get_tag_change!/1 returns the tag_change with given id" do - tag_change = tag_change_fixture() - assert Images.get_tag_change!(tag_change.id) == tag_change - end - - test "create_tag_change/1 with valid data creates a tag_change" do - assert {:ok, %TagChange{} = tag_change} = Images.create_tag_change(@valid_attrs) - end - - test "create_tag_change/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Images.create_tag_change(@invalid_attrs) - end - - test "update_tag_change/2 with valid data updates the tag_change" do - tag_change = tag_change_fixture() - - assert {:ok, %TagChange{} = tag_change} = - Images.update_tag_change(tag_change, @update_attrs) - end - - test "update_tag_change/2 with invalid data returns error changeset" do - tag_change = tag_change_fixture() - assert {:error, %Ecto.Changeset{}} = Images.update_tag_change(tag_change, @invalid_attrs) - assert tag_change == Images.get_tag_change!(tag_change.id) - end - - test "delete_tag_change/1 deletes the tag_change" do - tag_change = tag_change_fixture() - assert {:ok, %TagChange{}} = Images.delete_tag_change(tag_change) - assert_raise Ecto.NoResultsError, fn -> Images.get_tag_change!(tag_change.id) end - end - - test "change_tag_change/1 returns a tag_change changeset" do - tag_change = tag_change_fixture() - assert %Ecto.Changeset{} = Images.change_tag_change(tag_change) - end - end -end diff --git a/test/philomena/mod_notes_test.exs b/test/philomena/mod_notes_test.exs deleted file mode 100644 index 53483f4a..00000000 --- a/test/philomena/mod_notes_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ModNotesTest do - use Philomena.DataCase - - alias Philomena.ModNotes - - describe "mod_notes" do - alias Philomena.ModNotes.ModNote - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def mod_note_fixture(attrs \\ %{}) do - {:ok, mod_note} = - attrs - |> Enum.into(@valid_attrs) - |> ModNotes.create_mod_note() - - mod_note - end - - test "list_mod_notes/0 returns all mod_notes" do - mod_note = mod_note_fixture() - assert ModNotes.list_mod_notes() == [mod_note] - end - - test "get_mod_note!/1 returns the mod_note with given id" do - mod_note = mod_note_fixture() - assert ModNotes.get_mod_note!(mod_note.id) == mod_note - end - - test "create_mod_note/1 with valid data creates a mod_note" do - assert {:ok, %ModNote{} = mod_note} = ModNotes.create_mod_note(@valid_attrs) - end - - test "create_mod_note/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = ModNotes.create_mod_note(@invalid_attrs) - end - - test "update_mod_note/2 with valid data updates the mod_note" do - mod_note = mod_note_fixture() - assert {:ok, %ModNote{} = mod_note} = ModNotes.update_mod_note(mod_note, @update_attrs) - end - - test "update_mod_note/2 with invalid data returns error changeset" do - mod_note = mod_note_fixture() - assert {:error, %Ecto.Changeset{}} = ModNotes.update_mod_note(mod_note, @invalid_attrs) - assert mod_note == ModNotes.get_mod_note!(mod_note.id) - end - - test "delete_mod_note/1 deletes the mod_note" do - mod_note = mod_note_fixture() - assert {:ok, %ModNote{}} = ModNotes.delete_mod_note(mod_note) - assert_raise Ecto.NoResultsError, fn -> ModNotes.get_mod_note!(mod_note.id) end - end - - test "change_mod_note/1 returns a mod_note changeset" do - mod_note = mod_note_fixture() - assert %Ecto.Changeset{} = ModNotes.change_mod_note(mod_note) - end - end -end diff --git a/test/philomena/notifications_test.exs b/test/philomena/notifications_test.exs deleted file mode 100644 index 82ae0e32..00000000 --- a/test/philomena/notifications_test.exs +++ /dev/null @@ -1,137 +0,0 @@ -defmodule Philomena.NotificationsTest do - use Philomena.DataCase - - alias Philomena.Notifications - - describe "notifications" do - alias Philomena.Notifications.Notification - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def notification_fixture(attrs \\ %{}) do - {:ok, notification} = - attrs - |> Enum.into(@valid_attrs) - |> Notifications.create_notification() - - notification - end - - test "list_notifications/0 returns all notifications" do - notification = notification_fixture() - assert Notifications.list_notifications() == [notification] - end - - test "get_notification!/1 returns the notification with given id" do - notification = notification_fixture() - assert Notifications.get_notification!(notification.id) == notification - end - - test "create_notification/1 with valid data creates a notification" do - assert {:ok, %Notification{} = notification} = - Notifications.create_notification(@valid_attrs) - end - - test "create_notification/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Notifications.create_notification(@invalid_attrs) - end - - test "update_notification/2 with valid data updates the notification" do - notification = notification_fixture() - - assert {:ok, %Notification{} = notification} = - Notifications.update_notification(notification, @update_attrs) - end - - test "update_notification/2 with invalid data returns error changeset" do - notification = notification_fixture() - - assert {:error, %Ecto.Changeset{}} = - Notifications.update_notification(notification, @invalid_attrs) - - assert notification == Notifications.get_notification!(notification.id) - end - - test "delete_notification/1 deletes the notification" do - notification = notification_fixture() - assert {:ok, %Notification{}} = Notifications.delete_notification(notification) - assert_raise Ecto.NoResultsError, fn -> Notifications.get_notification!(notification.id) end - end - - test "change_notification/1 returns a notification changeset" do - notification = notification_fixture() - assert %Ecto.Changeset{} = Notifications.change_notification(notification) - end - end - - describe "unread_notifications" do - alias Philomena.Notifications.UnreadNotification - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def unread_notification_fixture(attrs \\ %{}) do - {:ok, unread_notification} = - attrs - |> Enum.into(@valid_attrs) - |> Notifications.create_unread_notification() - - unread_notification - end - - test "list_unread_notifications/0 returns all unread_notifications" do - unread_notification = unread_notification_fixture() - assert Notifications.list_unread_notifications() == [unread_notification] - end - - test "get_unread_notification!/1 returns the unread_notification with given id" do - unread_notification = unread_notification_fixture() - assert Notifications.get_unread_notification!(unread_notification.id) == unread_notification - end - - test "create_unread_notification/1 with valid data creates a unread_notification" do - assert {:ok, %UnreadNotification{} = unread_notification} = - Notifications.create_unread_notification(@valid_attrs) - end - - test "create_unread_notification/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = - Notifications.create_unread_notification(@invalid_attrs) - end - - test "update_unread_notification/2 with valid data updates the unread_notification" do - unread_notification = unread_notification_fixture() - - assert {:ok, %UnreadNotification{} = unread_notification} = - Notifications.update_unread_notification(unread_notification, @update_attrs) - end - - test "update_unread_notification/2 with invalid data returns error changeset" do - unread_notification = unread_notification_fixture() - - assert {:error, %Ecto.Changeset{}} = - Notifications.update_unread_notification(unread_notification, @invalid_attrs) - - assert unread_notification == Notifications.get_unread_notification!(unread_notification.id) - end - - test "delete_unread_notification/1 deletes the unread_notification" do - unread_notification = unread_notification_fixture() - - assert {:ok, %UnreadNotification{}} = - Notifications.delete_unread_notification(unread_notification) - - assert_raise Ecto.NoResultsError, fn -> - Notifications.get_unread_notification!(unread_notification.id) - end - end - - test "change_unread_notification/1 returns a unread_notification changeset" do - unread_notification = unread_notification_fixture() - assert %Ecto.Changeset{} = Notifications.change_unread_notification(unread_notification) - end - end -end diff --git a/test/philomena/poll_options_test.exs b/test/philomena/poll_options_test.exs deleted file mode 100644 index e65f24a5..00000000 --- a/test/philomena/poll_options_test.exs +++ /dev/null @@ -1,67 +0,0 @@ -defmodule Philomena.PollOptionsTest do - use Philomena.DataCase - - alias Philomena.PollOptions - - describe "poll_options" do - alias Philomena.PollOptions.PollOption - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def poll_option_fixture(attrs \\ %{}) do - {:ok, poll_option} = - attrs - |> Enum.into(@valid_attrs) - |> PollOptions.create_poll_option() - - poll_option - end - - test "list_poll_options/0 returns all poll_options" do - poll_option = poll_option_fixture() - assert PollOptions.list_poll_options() == [poll_option] - end - - test "get_poll_option!/1 returns the poll_option with given id" do - poll_option = poll_option_fixture() - assert PollOptions.get_poll_option!(poll_option.id) == poll_option - end - - test "create_poll_option/1 with valid data creates a poll_option" do - assert {:ok, %PollOption{} = poll_option} = PollOptions.create_poll_option(@valid_attrs) - end - - test "create_poll_option/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = PollOptions.create_poll_option(@invalid_attrs) - end - - test "update_poll_option/2 with valid data updates the poll_option" do - poll_option = poll_option_fixture() - - assert {:ok, %PollOption{} = poll_option} = - PollOptions.update_poll_option(poll_option, @update_attrs) - end - - test "update_poll_option/2 with invalid data returns error changeset" do - poll_option = poll_option_fixture() - - assert {:error, %Ecto.Changeset{}} = - PollOptions.update_poll_option(poll_option, @invalid_attrs) - - assert poll_option == PollOptions.get_poll_option!(poll_option.id) - end - - test "delete_poll_option/1 deletes the poll_option" do - poll_option = poll_option_fixture() - assert {:ok, %PollOption{}} = PollOptions.delete_poll_option(poll_option) - assert_raise Ecto.NoResultsError, fn -> PollOptions.get_poll_option!(poll_option.id) end - end - - test "change_poll_option/1 returns a poll_option changeset" do - poll_option = poll_option_fixture() - assert %Ecto.Changeset{} = PollOptions.change_poll_option(poll_option) - end - end -end diff --git a/test/philomena/poll_votes_test.exs b/test/philomena/poll_votes_test.exs deleted file mode 100644 index 20e372b7..00000000 --- a/test/philomena/poll_votes_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.PollVotesTest do - use Philomena.DataCase - - alias Philomena.PollVotes - - describe "poll_votes" do - alias Philomena.PollVotes.PollVote - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def poll_vote_fixture(attrs \\ %{}) do - {:ok, poll_vote} = - attrs - |> Enum.into(@valid_attrs) - |> PollVotes.create_poll_vote() - - poll_vote - end - - test "list_poll_votes/0 returns all poll_votes" do - poll_vote = poll_vote_fixture() - assert PollVotes.list_poll_votes() == [poll_vote] - end - - test "get_poll_vote!/1 returns the poll_vote with given id" do - poll_vote = poll_vote_fixture() - assert PollVotes.get_poll_vote!(poll_vote.id) == poll_vote - end - - test "create_poll_vote/1 with valid data creates a poll_vote" do - assert {:ok, %PollVote{} = poll_vote} = PollVotes.create_poll_vote(@valid_attrs) - end - - test "create_poll_vote/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = PollVotes.create_poll_vote(@invalid_attrs) - end - - test "update_poll_vote/2 with valid data updates the poll_vote" do - poll_vote = poll_vote_fixture() - assert {:ok, %PollVote{} = poll_vote} = PollVotes.update_poll_vote(poll_vote, @update_attrs) - end - - test "update_poll_vote/2 with invalid data returns error changeset" do - poll_vote = poll_vote_fixture() - assert {:error, %Ecto.Changeset{}} = PollVotes.update_poll_vote(poll_vote, @invalid_attrs) - assert poll_vote == PollVotes.get_poll_vote!(poll_vote.id) - end - - test "delete_poll_vote/1 deletes the poll_vote" do - poll_vote = poll_vote_fixture() - assert {:ok, %PollVote{}} = PollVotes.delete_poll_vote(poll_vote) - assert_raise Ecto.NoResultsError, fn -> PollVotes.get_poll_vote!(poll_vote.id) end - end - - test "change_poll_vote/1 returns a poll_vote changeset" do - poll_vote = poll_vote_fixture() - assert %Ecto.Changeset{} = PollVotes.change_poll_vote(poll_vote) - end - end -end diff --git a/test/philomena/polls_test.exs b/test/philomena/polls_test.exs deleted file mode 100644 index 4c36cfab..00000000 --- a/test/philomena/polls_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.PollsTest do - use Philomena.DataCase - - alias Philomena.Polls - - describe "polls" do - alias Philomena.Polls.Poll - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def poll_fixture(attrs \\ %{}) do - {:ok, poll} = - attrs - |> Enum.into(@valid_attrs) - |> Polls.create_poll() - - poll - end - - test "list_polls/0 returns all polls" do - poll = poll_fixture() - assert Polls.list_polls() == [poll] - end - - test "get_poll!/1 returns the poll with given id" do - poll = poll_fixture() - assert Polls.get_poll!(poll.id) == poll - end - - test "create_poll/1 with valid data creates a poll" do - assert {:ok, %Poll{} = poll} = Polls.create_poll(@valid_attrs) - end - - test "create_poll/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Polls.create_poll(@invalid_attrs) - end - - test "update_poll/2 with valid data updates the poll" do - poll = poll_fixture() - assert {:ok, %Poll{} = poll} = Polls.update_poll(poll, @update_attrs) - end - - test "update_poll/2 with invalid data returns error changeset" do - poll = poll_fixture() - assert {:error, %Ecto.Changeset{}} = Polls.update_poll(poll, @invalid_attrs) - assert poll == Polls.get_poll!(poll.id) - end - - test "delete_poll/1 deletes the poll" do - poll = poll_fixture() - assert {:ok, %Poll{}} = Polls.delete_poll(poll) - assert_raise Ecto.NoResultsError, fn -> Polls.get_poll!(poll.id) end - end - - test "change_poll/1 returns a poll changeset" do - poll = poll_fixture() - assert %Ecto.Changeset{} = Polls.change_poll(poll) - end - end -end diff --git a/test/philomena/posts_test.exs b/test/philomena/posts_test.exs deleted file mode 100644 index 130a6ee7..00000000 --- a/test/philomena/posts_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.PostsTest do - use Philomena.DataCase - - alias Philomena.Posts - - describe "posts" do - alias Philomena.Posts.Post - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def post_fixture(attrs \\ %{}) do - {:ok, post} = - attrs - |> Enum.into(@valid_attrs) - |> Posts.create_post() - - post - end - - test "list_posts/0 returns all posts" do - post = post_fixture() - assert Posts.list_posts() == [post] - end - - test "get_post!/1 returns the post with given id" do - post = post_fixture() - assert Posts.get_post!(post.id) == post - end - - test "create_post/1 with valid data creates a post" do - assert {:ok, %Post{} = post} = Posts.create_post(@valid_attrs) - end - - test "create_post/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Posts.create_post(@invalid_attrs) - end - - test "update_post/2 with valid data updates the post" do - post = post_fixture() - assert {:ok, %Post{} = post} = Posts.update_post(post, @update_attrs) - end - - test "update_post/2 with invalid data returns error changeset" do - post = post_fixture() - assert {:error, %Ecto.Changeset{}} = Posts.update_post(post, @invalid_attrs) - assert post == Posts.get_post!(post.id) - end - - test "delete_post/1 deletes the post" do - post = post_fixture() - assert {:ok, %Post{}} = Posts.delete_post(post) - assert_raise Ecto.NoResultsError, fn -> Posts.get_post!(post.id) end - end - - test "change_post/1 returns a post changeset" do - post = post_fixture() - assert %Ecto.Changeset{} = Posts.change_post(post) - end - end -end diff --git a/test/philomena/reports_test.exs b/test/philomena/reports_test.exs deleted file mode 100644 index 012e878d..00000000 --- a/test/philomena/reports_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.ReportsTest do - use Philomena.DataCase - - alias Philomena.Reports - - describe "reports" do - alias Philomena.Reports.Report - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def report_fixture(attrs \\ %{}) do - {:ok, report} = - attrs - |> Enum.into(@valid_attrs) - |> Reports.create_report() - - report - end - - test "list_reports/0 returns all reports" do - report = report_fixture() - assert Reports.list_reports() == [report] - end - - test "get_report!/1 returns the report with given id" do - report = report_fixture() - assert Reports.get_report!(report.id) == report - end - - test "create_report/1 with valid data creates a report" do - assert {:ok, %Report{} = report} = Reports.create_report(@valid_attrs) - end - - test "create_report/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Reports.create_report(@invalid_attrs) - end - - test "update_report/2 with valid data updates the report" do - report = report_fixture() - assert {:ok, %Report{} = report} = Reports.update_report(report, @update_attrs) - end - - test "update_report/2 with invalid data returns error changeset" do - report = report_fixture() - assert {:error, %Ecto.Changeset{}} = Reports.update_report(report, @invalid_attrs) - assert report == Reports.get_report!(report.id) - end - - test "delete_report/1 deletes the report" do - report = report_fixture() - assert {:ok, %Report{}} = Reports.delete_report(report) - assert_raise Ecto.NoResultsError, fn -> Reports.get_report!(report.id) end - end - - test "change_report/1 returns a report changeset" do - report = report_fixture() - assert %Ecto.Changeset{} = Reports.change_report(report) - end - end -end diff --git a/test/philomena/roles_test.exs b/test/philomena/roles_test.exs deleted file mode 100644 index 41b166e4..00000000 --- a/test/philomena/roles_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.RolesTest do - use Philomena.DataCase - - alias Philomena.Roles - - describe "roles" do - alias Philomena.Roles.Role - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def role_fixture(attrs \\ %{}) do - {:ok, role} = - attrs - |> Enum.into(@valid_attrs) - |> Roles.create_role() - - role - end - - test "list_roles/0 returns all roles" do - role = role_fixture() - assert Roles.list_roles() == [role] - end - - test "get_role!/1 returns the role with given id" do - role = role_fixture() - assert Roles.get_role!(role.id) == role - end - - test "create_role/1 with valid data creates a role" do - assert {:ok, %Role{} = role} = Roles.create_role(@valid_attrs) - end - - test "create_role/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Roles.create_role(@invalid_attrs) - end - - test "update_role/2 with valid data updates the role" do - role = role_fixture() - assert {:ok, %Role{} = role} = Roles.update_role(role, @update_attrs) - end - - test "update_role/2 with invalid data returns error changeset" do - role = role_fixture() - assert {:error, %Ecto.Changeset{}} = Roles.update_role(role, @invalid_attrs) - assert role == Roles.get_role!(role.id) - end - - test "delete_role/1 deletes the role" do - role = role_fixture() - assert {:ok, %Role{}} = Roles.delete_role(role) - assert_raise Ecto.NoResultsError, fn -> Roles.get_role!(role.id) end - end - - test "change_role/1 returns a role changeset" do - role = role_fixture() - assert %Ecto.Changeset{} = Roles.change_role(role) - end - end -end diff --git a/test/philomena/site_notices_test.exs b/test/philomena/site_notices_test.exs deleted file mode 100644 index 766e392c..00000000 --- a/test/philomena/site_notices_test.exs +++ /dev/null @@ -1,67 +0,0 @@ -defmodule Philomena.SiteNoticesTest do - use Philomena.DataCase - - alias Philomena.SiteNotices - - describe "site_notices" do - alias Philomena.SiteNotices.SiteNotice - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def site_notice_fixture(attrs \\ %{}) do - {:ok, site_notice} = - attrs - |> Enum.into(@valid_attrs) - |> SiteNotices.create_site_notice() - - site_notice - end - - test "list_site_notices/0 returns all site_notices" do - site_notice = site_notice_fixture() - assert SiteNotices.list_site_notices() == [site_notice] - end - - test "get_site_notice!/1 returns the site_notice with given id" do - site_notice = site_notice_fixture() - assert SiteNotices.get_site_notice!(site_notice.id) == site_notice - end - - test "create_site_notice/1 with valid data creates a site_notice" do - assert {:ok, %SiteNotice{} = site_notice} = SiteNotices.create_site_notice(@valid_attrs) - end - - test "create_site_notice/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = SiteNotices.create_site_notice(@invalid_attrs) - end - - test "update_site_notice/2 with valid data updates the site_notice" do - site_notice = site_notice_fixture() - - assert {:ok, %SiteNotice{} = site_notice} = - SiteNotices.update_site_notice(site_notice, @update_attrs) - end - - test "update_site_notice/2 with invalid data returns error changeset" do - site_notice = site_notice_fixture() - - assert {:error, %Ecto.Changeset{}} = - SiteNotices.update_site_notice(site_notice, @invalid_attrs) - - assert site_notice == SiteNotices.get_site_notice!(site_notice.id) - end - - test "delete_site_notice/1 deletes the site_notice" do - site_notice = site_notice_fixture() - assert {:ok, %SiteNotice{}} = SiteNotices.delete_site_notice(site_notice) - assert_raise Ecto.NoResultsError, fn -> SiteNotices.get_site_notice!(site_notice.id) end - end - - test "change_site_notice/1 returns a site_notice changeset" do - site_notice = site_notice_fixture() - assert %Ecto.Changeset{} = SiteNotices.change_site_notice(site_notice) - end - end -end diff --git a/test/philomena/source_changes_test.exs b/test/philomena/source_changes_test.exs deleted file mode 100644 index 40d0bd38..00000000 --- a/test/philomena/source_changes_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.SourceChangesTest do - use Philomena.DataCase - - alias Philomena.SourceChanges - - describe "source_changes" do - alias Philomena.SourceChanges.SourceChange - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def source_change_fixture(attrs \\ %{}) do - {:ok, source_change} = - attrs - |> Enum.into(@valid_attrs) - |> SourceChanges.create_source_change() - - source_change - end - - test "list_source_changes/0 returns all source_changes" do - source_change = source_change_fixture() - assert SourceChanges.list_source_changes() == [source_change] - end - - test "get_source_change!/1 returns the source_change with given id" do - source_change = source_change_fixture() - assert SourceChanges.get_source_change!(source_change.id) == source_change - end - - test "create_source_change/1 with valid data creates a source_change" do - assert {:ok, %SourceChange{} = source_change} = SourceChanges.create_source_change(@valid_attrs) - end - - test "create_source_change/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = SourceChanges.create_source_change(@invalid_attrs) - end - - test "update_source_change/2 with valid data updates the source_change" do - source_change = source_change_fixture() - assert {:ok, %SourceChange{} = source_change} = SourceChanges.update_source_change(source_change, @update_attrs) - end - - test "update_source_change/2 with invalid data returns error changeset" do - source_change = source_change_fixture() - assert {:error, %Ecto.Changeset{}} = SourceChanges.update_source_change(source_change, @invalid_attrs) - assert source_change == SourceChanges.get_source_change!(source_change.id) - end - - test "delete_source_change/1 deletes the source_change" do - source_change = source_change_fixture() - assert {:ok, %SourceChange{}} = SourceChanges.delete_source_change(source_change) - assert_raise Ecto.NoResultsError, fn -> SourceChanges.get_source_change!(source_change.id) end - end - - test "change_source_change/1 returns a source_change changeset" do - source_change = source_change_fixture() - assert %Ecto.Changeset{} = SourceChanges.change_source_change(source_change) - end - end -end diff --git a/test/philomena/static_pages_test.exs b/test/philomena/static_pages_test.exs deleted file mode 100644 index 33d1fb2c..00000000 --- a/test/philomena/static_pages_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.StaticPagesTest do - use Philomena.DataCase - - alias Philomena.StaticPages - - describe "static_pages" do - alias Philomena.StaticPages.StaticPage - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def static_page_fixture(attrs \\ %{}) do - {:ok, static_page} = - attrs - |> Enum.into(@valid_attrs) - |> StaticPages.create_static_page() - - static_page - end - - test "list_static_pages/0 returns all static_pages" do - static_page = static_page_fixture() - assert StaticPages.list_static_pages() == [static_page] - end - - test "get_static_page!/1 returns the static_page with given id" do - static_page = static_page_fixture() - assert StaticPages.get_static_page!(static_page.id) == static_page - end - - test "create_static_page/1 with valid data creates a static_page" do - assert {:ok, %StaticPage{} = static_page} = StaticPages.create_static_page(@valid_attrs) - end - - test "create_static_page/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = StaticPages.create_static_page(@invalid_attrs) - end - - test "update_static_page/2 with valid data updates the static_page" do - static_page = static_page_fixture() - assert {:ok, %StaticPage{} = static_page} = StaticPages.update_static_page(static_page, @update_attrs) - end - - test "update_static_page/2 with invalid data returns error changeset" do - static_page = static_page_fixture() - assert {:error, %Ecto.Changeset{}} = StaticPages.update_static_page(static_page, @invalid_attrs) - assert static_page == StaticPages.get_static_page!(static_page.id) - end - - test "delete_static_page/1 deletes the static_page" do - static_page = static_page_fixture() - assert {:ok, %StaticPage{}} = StaticPages.delete_static_page(static_page) - assert_raise Ecto.NoResultsError, fn -> StaticPages.get_static_page!(static_page.id) end - end - - test "change_static_page/1 returns a static_page changeset" do - static_page = static_page_fixture() - assert %Ecto.Changeset{} = StaticPages.change_static_page(static_page) - end - end -end diff --git a/test/philomena/tag_changes_test.exs b/test/philomena/tag_changes_test.exs deleted file mode 100644 index 8473b103..00000000 --- a/test/philomena/tag_changes_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.TagChangesTest do - use Philomena.DataCase - - alias Philomena.TagChanges - - describe "tag_changes" do - alias Philomena.TagChanges.TagChange - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def tag_change_fixture(attrs \\ %{}) do - {:ok, tag_change} = - attrs - |> Enum.into(@valid_attrs) - |> TagChanges.create_tag_change() - - tag_change - end - - test "list_tag_changes/0 returns all tag_changes" do - tag_change = tag_change_fixture() - assert TagChanges.list_tag_changes() == [tag_change] - end - - test "get_tag_change!/1 returns the tag_change with given id" do - tag_change = tag_change_fixture() - assert TagChanges.get_tag_change!(tag_change.id) == tag_change - end - - test "create_tag_change/1 with valid data creates a tag_change" do - assert {:ok, %TagChange{} = tag_change} = TagChanges.create_tag_change(@valid_attrs) - end - - test "create_tag_change/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = TagChanges.create_tag_change(@invalid_attrs) - end - - test "update_tag_change/2 with valid data updates the tag_change" do - tag_change = tag_change_fixture() - assert {:ok, %TagChange{} = tag_change} = TagChanges.update_tag_change(tag_change, @update_attrs) - end - - test "update_tag_change/2 with invalid data returns error changeset" do - tag_change = tag_change_fixture() - assert {:error, %Ecto.Changeset{}} = TagChanges.update_tag_change(tag_change, @invalid_attrs) - assert tag_change == TagChanges.get_tag_change!(tag_change.id) - end - - test "delete_tag_change/1 deletes the tag_change" do - tag_change = tag_change_fixture() - assert {:ok, %TagChange{}} = TagChanges.delete_tag_change(tag_change) - assert_raise Ecto.NoResultsError, fn -> TagChanges.get_tag_change!(tag_change.id) end - end - - test "change_tag_change/1 returns a tag_change changeset" do - tag_change = tag_change_fixture() - assert %Ecto.Changeset{} = TagChanges.change_tag_change(tag_change) - end - end -end diff --git a/test/philomena/tags_test.exs b/test/philomena/tags_test.exs deleted file mode 100644 index 7cdf9f83..00000000 --- a/test/philomena/tags_test.exs +++ /dev/null @@ -1,121 +0,0 @@ -defmodule Philomena.TagsTest do - use Philomena.DataCase - - alias Philomena.Tags - - describe "tags" do - alias Philomena.Tags.Tag - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def tag_fixture(attrs \\ %{}) do - {:ok, tag} = - attrs - |> Enum.into(@valid_attrs) - |> Tags.create_tag() - - tag - end - - test "list_tags/0 returns all tags" do - tag = tag_fixture() - assert Tags.list_tags() == [tag] - end - - test "get_tag!/1 returns the tag with given id" do - tag = tag_fixture() - assert Tags.get_tag!(tag.id) == tag - end - - test "create_tag/1 with valid data creates a tag" do - assert {:ok, %Tag{} = tag} = Tags.create_tag(@valid_attrs) - end - - test "create_tag/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Tags.create_tag(@invalid_attrs) - end - - test "update_tag/2 with valid data updates the tag" do - tag = tag_fixture() - assert {:ok, %Tag{} = tag} = Tags.update_tag(tag, @update_attrs) - end - - test "update_tag/2 with invalid data returns error changeset" do - tag = tag_fixture() - assert {:error, %Ecto.Changeset{}} = Tags.update_tag(tag, @invalid_attrs) - assert tag == Tags.get_tag!(tag.id) - end - - test "delete_tag/1 deletes the tag" do - tag = tag_fixture() - assert {:ok, %Tag{}} = Tags.delete_tag(tag) - assert_raise Ecto.NoResultsError, fn -> Tags.get_tag!(tag.id) end - end - - test "change_tag/1 returns a tag changeset" do - tag = tag_fixture() - assert %Ecto.Changeset{} = Tags.change_tag(tag) - end - end - - describe "tags_implied_tags" do - alias Philomena.Tags.Implication - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def implication_fixture(attrs \\ %{}) do - {:ok, implication} = - attrs - |> Enum.into(@valid_attrs) - |> Tags.create_implication() - - implication - end - - test "list_tags_implied_tags/0 returns all tags_implied_tags" do - implication = implication_fixture() - assert Tags.list_tags_implied_tags() == [implication] - end - - test "get_implication!/1 returns the implication with given id" do - implication = implication_fixture() - assert Tags.get_implication!(implication.id) == implication - end - - test "create_implication/1 with valid data creates a implication" do - assert {:ok, %Implication{} = implication} = Tags.create_implication(@valid_attrs) - end - - test "create_implication/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Tags.create_implication(@invalid_attrs) - end - - test "update_implication/2 with valid data updates the implication" do - implication = implication_fixture() - - assert {:ok, %Implication{} = implication} = - Tags.update_implication(implication, @update_attrs) - end - - test "update_implication/2 with invalid data returns error changeset" do - implication = implication_fixture() - assert {:error, %Ecto.Changeset{}} = Tags.update_implication(implication, @invalid_attrs) - assert implication == Tags.get_implication!(implication.id) - end - - test "delete_implication/1 deletes the implication" do - implication = implication_fixture() - assert {:ok, %Implication{}} = Tags.delete_implication(implication) - assert_raise Ecto.NoResultsError, fn -> Tags.get_implication!(implication.id) end - end - - test "change_implication/1 returns a implication changeset" do - implication = implication_fixture() - assert %Ecto.Changeset{} = Tags.change_implication(implication) - end - end -end diff --git a/test/philomena/topics_test.exs b/test/philomena/topics_test.exs deleted file mode 100644 index 02aa1c13..00000000 --- a/test/philomena/topics_test.exs +++ /dev/null @@ -1,124 +0,0 @@ -defmodule Philomena.TopicsTest do - use Philomena.DataCase - - alias Philomena.Topics - - describe "topics" do - alias Philomena.Topics.Topic - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def topic_fixture(attrs \\ %{}) do - {:ok, topic} = - attrs - |> Enum.into(@valid_attrs) - |> Topics.create_topic() - - topic - end - - test "list_topics/0 returns all topics" do - topic = topic_fixture() - assert Topics.list_topics() == [topic] - end - - test "get_topic!/1 returns the topic with given id" do - topic = topic_fixture() - assert Topics.get_topic!(topic.id) == topic - end - - test "create_topic/1 with valid data creates a topic" do - assert {:ok, %Topic{} = topic} = Topics.create_topic(@valid_attrs) - end - - test "create_topic/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Topics.create_topic(@invalid_attrs) - end - - test "update_topic/2 with valid data updates the topic" do - topic = topic_fixture() - assert {:ok, %Topic{} = topic} = Topics.update_topic(topic, @update_attrs) - end - - test "update_topic/2 with invalid data returns error changeset" do - topic = topic_fixture() - assert {:error, %Ecto.Changeset{}} = Topics.update_topic(topic, @invalid_attrs) - assert topic == Topics.get_topic!(topic.id) - end - - test "delete_topic/1 deletes the topic" do - topic = topic_fixture() - assert {:ok, %Topic{}} = Topics.delete_topic(topic) - assert_raise Ecto.NoResultsError, fn -> Topics.get_topic!(topic.id) end - end - - test "change_topic/1 returns a topic changeset" do - topic = topic_fixture() - assert %Ecto.Changeset{} = Topics.change_topic(topic) - end - end - - describe "topic_subscriptions" do - alias Philomena.Topics.Subscription - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def subscription_fixture(attrs \\ %{}) do - {:ok, subscription} = - attrs - |> Enum.into(@valid_attrs) - |> Topics.create_subscription() - - subscription - end - - test "list_topic_subscriptions/0 returns all topic_subscriptions" do - subscription = subscription_fixture() - assert Topics.list_topic_subscriptions() == [subscription] - end - - test "get_subscription!/1 returns the subscription with given id" do - subscription = subscription_fixture() - assert Topics.get_subscription!(subscription.id) == subscription - end - - test "create_subscription/1 with valid data creates a subscription" do - assert {:ok, %Subscription{} = subscription} = Topics.create_subscription(@valid_attrs) - end - - test "create_subscription/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Topics.create_subscription(@invalid_attrs) - end - - test "update_subscription/2 with valid data updates the subscription" do - subscription = subscription_fixture() - - assert {:ok, %Subscription{} = subscription} = - Topics.update_subscription(subscription, @update_attrs) - end - - test "update_subscription/2 with invalid data returns error changeset" do - subscription = subscription_fixture() - - assert {:error, %Ecto.Changeset{}} = - Topics.update_subscription(subscription, @invalid_attrs) - - assert subscription == Topics.get_subscription!(subscription.id) - end - - test "delete_subscription/1 deletes the subscription" do - subscription = subscription_fixture() - assert {:ok, %Subscription{}} = Topics.delete_subscription(subscription) - assert_raise Ecto.NoResultsError, fn -> Topics.get_subscription!(subscription.id) end - end - - test "change_subscription/1 returns a subscription changeset" do - subscription = subscription_fixture() - assert %Ecto.Changeset{} = Topics.change_subscription(subscription) - end - end -end diff --git a/test/philomena/user_fingerprints_test.exs b/test/philomena/user_fingerprints_test.exs deleted file mode 100644 index 1a3358ee..00000000 --- a/test/philomena/user_fingerprints_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.UserFingerprintsTest do - use Philomena.DataCase - - alias Philomena.UserFingerprints - - describe "user_fingerprints" do - alias Philomena.UserFingerprints.UserFingerprint - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_fingerprint_fixture(attrs \\ %{}) do - {:ok, user_fingerprint} = - attrs - |> Enum.into(@valid_attrs) - |> UserFingerprints.create_user_fingerprint() - - user_fingerprint - end - - test "list_user_fingerprints/0 returns all user_fingerprints" do - user_fingerprint = user_fingerprint_fixture() - assert UserFingerprints.list_user_fingerprints() == [user_fingerprint] - end - - test "get_user_fingerprint!/1 returns the user_fingerprint with given id" do - user_fingerprint = user_fingerprint_fixture() - assert UserFingerprints.get_user_fingerprint!(user_fingerprint.id) == user_fingerprint - end - - test "create_user_fingerprint/1 with valid data creates a user_fingerprint" do - assert {:ok, %UserFingerprint{} = user_fingerprint} = UserFingerprints.create_user_fingerprint(@valid_attrs) - end - - test "create_user_fingerprint/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = UserFingerprints.create_user_fingerprint(@invalid_attrs) - end - - test "update_user_fingerprint/2 with valid data updates the user_fingerprint" do - user_fingerprint = user_fingerprint_fixture() - assert {:ok, %UserFingerprint{} = user_fingerprint} = UserFingerprints.update_user_fingerprint(user_fingerprint, @update_attrs) - end - - test "update_user_fingerprint/2 with invalid data returns error changeset" do - user_fingerprint = user_fingerprint_fixture() - assert {:error, %Ecto.Changeset{}} = UserFingerprints.update_user_fingerprint(user_fingerprint, @invalid_attrs) - assert user_fingerprint == UserFingerprints.get_user_fingerprint!(user_fingerprint.id) - end - - test "delete_user_fingerprint/1 deletes the user_fingerprint" do - user_fingerprint = user_fingerprint_fixture() - assert {:ok, %UserFingerprint{}} = UserFingerprints.delete_user_fingerprint(user_fingerprint) - assert_raise Ecto.NoResultsError, fn -> UserFingerprints.get_user_fingerprint!(user_fingerprint.id) end - end - - test "change_user_fingerprint/1 returns a user_fingerprint changeset" do - user_fingerprint = user_fingerprint_fixture() - assert %Ecto.Changeset{} = UserFingerprints.change_user_fingerprint(user_fingerprint) - end - end -end diff --git a/test/philomena/user_ips_test.exs b/test/philomena/user_ips_test.exs deleted file mode 100644 index c9959f72..00000000 --- a/test/philomena/user_ips_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.UserIpsTest do - use Philomena.DataCase - - alias Philomena.UserIps - - describe "user_ips" do - alias Philomena.UserIps.UserIp - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_ip_fixture(attrs \\ %{}) do - {:ok, user_ip} = - attrs - |> Enum.into(@valid_attrs) - |> UserIps.create_user_ip() - - user_ip - end - - test "list_user_ips/0 returns all user_ips" do - user_ip = user_ip_fixture() - assert UserIps.list_user_ips() == [user_ip] - end - - test "get_user_ip!/1 returns the user_ip with given id" do - user_ip = user_ip_fixture() - assert UserIps.get_user_ip!(user_ip.id) == user_ip - end - - test "create_user_ip/1 with valid data creates a user_ip" do - assert {:ok, %UserIp{} = user_ip} = UserIps.create_user_ip(@valid_attrs) - end - - test "create_user_ip/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = UserIps.create_user_ip(@invalid_attrs) - end - - test "update_user_ip/2 with valid data updates the user_ip" do - user_ip = user_ip_fixture() - assert {:ok, %UserIp{} = user_ip} = UserIps.update_user_ip(user_ip, @update_attrs) - end - - test "update_user_ip/2 with invalid data returns error changeset" do - user_ip = user_ip_fixture() - assert {:error, %Ecto.Changeset{}} = UserIps.update_user_ip(user_ip, @invalid_attrs) - assert user_ip == UserIps.get_user_ip!(user_ip.id) - end - - test "delete_user_ip/1 deletes the user_ip" do - user_ip = user_ip_fixture() - assert {:ok, %UserIp{}} = UserIps.delete_user_ip(user_ip) - assert_raise Ecto.NoResultsError, fn -> UserIps.get_user_ip!(user_ip.id) end - end - - test "change_user_ip/1 returns a user_ip changeset" do - user_ip = user_ip_fixture() - assert %Ecto.Changeset{} = UserIps.change_user_ip(user_ip) - end - end -end diff --git a/test/philomena/user_links_test.exs b/test/philomena/user_links_test.exs deleted file mode 100644 index db9bd4d5..00000000 --- a/test/philomena/user_links_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.UserLinksTest do - use Philomena.DataCase - - alias Philomena.UserLinks - - describe "user_links" do - alias Philomena.UserLinks.UserLink - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_link_fixture(attrs \\ %{}) do - {:ok, user_link} = - attrs - |> Enum.into(@valid_attrs) - |> UserLinks.create_user_link() - - user_link - end - - test "list_user_links/0 returns all user_links" do - user_link = user_link_fixture() - assert UserLinks.list_user_links() == [user_link] - end - - test "get_user_link!/1 returns the user_link with given id" do - user_link = user_link_fixture() - assert UserLinks.get_user_link!(user_link.id) == user_link - end - - test "create_user_link/1 with valid data creates a user_link" do - assert {:ok, %UserLink{} = user_link} = UserLinks.create_user_link(@valid_attrs) - end - - test "create_user_link/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = UserLinks.create_user_link(@invalid_attrs) - end - - test "update_user_link/2 with valid data updates the user_link" do - user_link = user_link_fixture() - assert {:ok, %UserLink{} = user_link} = UserLinks.update_user_link(user_link, @update_attrs) - end - - test "update_user_link/2 with invalid data returns error changeset" do - user_link = user_link_fixture() - assert {:error, %Ecto.Changeset{}} = UserLinks.update_user_link(user_link, @invalid_attrs) - assert user_link == UserLinks.get_user_link!(user_link.id) - end - - test "delete_user_link/1 deletes the user_link" do - user_link = user_link_fixture() - assert {:ok, %UserLink{}} = UserLinks.delete_user_link(user_link) - assert_raise Ecto.NoResultsError, fn -> UserLinks.get_user_link!(user_link.id) end - end - - test "change_user_link/1 returns a user_link changeset" do - user_link = user_link_fixture() - assert %Ecto.Changeset{} = UserLinks.change_user_link(user_link) - end - end -end diff --git a/test/philomena/user_name_changes_test.exs b/test/philomena/user_name_changes_test.exs deleted file mode 100644 index 8cfe3efc..00000000 --- a/test/philomena/user_name_changes_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.UserNameChangesTest do - use Philomena.DataCase - - alias Philomena.UserNameChanges - - describe "user_name_changes" do - alias Philomena.UserNameChanges.UserNameChange - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_name_change_fixture(attrs \\ %{}) do - {:ok, user_name_change} = - attrs - |> Enum.into(@valid_attrs) - |> UserNameChanges.create_user_name_change() - - user_name_change - end - - test "list_user_name_changes/0 returns all user_name_changes" do - user_name_change = user_name_change_fixture() - assert UserNameChanges.list_user_name_changes() == [user_name_change] - end - - test "get_user_name_change!/1 returns the user_name_change with given id" do - user_name_change = user_name_change_fixture() - assert UserNameChanges.get_user_name_change!(user_name_change.id) == user_name_change - end - - test "create_user_name_change/1 with valid data creates a user_name_change" do - assert {:ok, %UserNameChange{} = user_name_change} = UserNameChanges.create_user_name_change(@valid_attrs) - end - - test "create_user_name_change/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = UserNameChanges.create_user_name_change(@invalid_attrs) - end - - test "update_user_name_change/2 with valid data updates the user_name_change" do - user_name_change = user_name_change_fixture() - assert {:ok, %UserNameChange{} = user_name_change} = UserNameChanges.update_user_name_change(user_name_change, @update_attrs) - end - - test "update_user_name_change/2 with invalid data returns error changeset" do - user_name_change = user_name_change_fixture() - assert {:error, %Ecto.Changeset{}} = UserNameChanges.update_user_name_change(user_name_change, @invalid_attrs) - assert user_name_change == UserNameChanges.get_user_name_change!(user_name_change.id) - end - - test "delete_user_name_change/1 deletes the user_name_change" do - user_name_change = user_name_change_fixture() - assert {:ok, %UserNameChange{}} = UserNameChanges.delete_user_name_change(user_name_change) - assert_raise Ecto.NoResultsError, fn -> UserNameChanges.get_user_name_change!(user_name_change.id) end - end - - test "change_user_name_change/1 returns a user_name_change changeset" do - user_name_change = user_name_change_fixture() - assert %Ecto.Changeset{} = UserNameChanges.change_user_name_change(user_name_change) - end - end -end diff --git a/test/philomena/user_statistics_test.exs b/test/philomena/user_statistics_test.exs deleted file mode 100644 index 3e21e343..00000000 --- a/test/philomena/user_statistics_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.UserStatisticsTest do - use Philomena.DataCase - - alias Philomena.UserStatistics - - describe "user_statistics" do - alias Philomena.UserStatistics.UserStatistic - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_statistic_fixture(attrs \\ %{}) do - {:ok, user_statistic} = - attrs - |> Enum.into(@valid_attrs) - |> UserStatistics.create_user_statistic() - - user_statistic - end - - test "list_user_statistics/0 returns all user_statistics" do - user_statistic = user_statistic_fixture() - assert UserStatistics.list_user_statistics() == [user_statistic] - end - - test "get_user_statistic!/1 returns the user_statistic with given id" do - user_statistic = user_statistic_fixture() - assert UserStatistics.get_user_statistic!(user_statistic.id) == user_statistic - end - - test "create_user_statistic/1 with valid data creates a user_statistic" do - assert {:ok, %UserStatistic{} = user_statistic} = UserStatistics.create_user_statistic(@valid_attrs) - end - - test "create_user_statistic/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = UserStatistics.create_user_statistic(@invalid_attrs) - end - - test "update_user_statistic/2 with valid data updates the user_statistic" do - user_statistic = user_statistic_fixture() - assert {:ok, %UserStatistic{} = user_statistic} = UserStatistics.update_user_statistic(user_statistic, @update_attrs) - end - - test "update_user_statistic/2 with invalid data returns error changeset" do - user_statistic = user_statistic_fixture() - assert {:error, %Ecto.Changeset{}} = UserStatistics.update_user_statistic(user_statistic, @invalid_attrs) - assert user_statistic == UserStatistics.get_user_statistic!(user_statistic.id) - end - - test "delete_user_statistic/1 deletes the user_statistic" do - user_statistic = user_statistic_fixture() - assert {:ok, %UserStatistic{}} = UserStatistics.delete_user_statistic(user_statistic) - assert_raise Ecto.NoResultsError, fn -> UserStatistics.get_user_statistic!(user_statistic.id) end - end - - test "change_user_statistic/1 returns a user_statistic changeset" do - user_statistic = user_statistic_fixture() - assert %Ecto.Changeset{} = UserStatistics.change_user_statistic(user_statistic) - end - end -end diff --git a/test/philomena/user_whitelists_test.exs b/test/philomena/user_whitelists_test.exs deleted file mode 100644 index 20f0f2f0..00000000 --- a/test/philomena/user_whitelists_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.UserWhitelistsTest do - use Philomena.DataCase - - alias Philomena.UserWhitelists - - describe "user_whitelists" do - alias Philomena.UserWhitelists.UserWhitelist - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def user_whitelist_fixture(attrs \\ %{}) do - {:ok, user_whitelist} = - attrs - |> Enum.into(@valid_attrs) - |> UserWhitelists.create_user_whitelist() - - user_whitelist - end - - test "list_user_whitelists/0 returns all user_whitelists" do - user_whitelist = user_whitelist_fixture() - assert UserWhitelists.list_user_whitelists() == [user_whitelist] - end - - test "get_user_whitelist!/1 returns the user_whitelist with given id" do - user_whitelist = user_whitelist_fixture() - assert UserWhitelists.get_user_whitelist!(user_whitelist.id) == user_whitelist - end - - test "create_user_whitelist/1 with valid data creates a user_whitelist" do - assert {:ok, %UserWhitelist{} = user_whitelist} = UserWhitelists.create_user_whitelist(@valid_attrs) - end - - test "create_user_whitelist/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = UserWhitelists.create_user_whitelist(@invalid_attrs) - end - - test "update_user_whitelist/2 with valid data updates the user_whitelist" do - user_whitelist = user_whitelist_fixture() - assert {:ok, %UserWhitelist{} = user_whitelist} = UserWhitelists.update_user_whitelist(user_whitelist, @update_attrs) - end - - test "update_user_whitelist/2 with invalid data returns error changeset" do - user_whitelist = user_whitelist_fixture() - assert {:error, %Ecto.Changeset{}} = UserWhitelists.update_user_whitelist(user_whitelist, @invalid_attrs) - assert user_whitelist == UserWhitelists.get_user_whitelist!(user_whitelist.id) - end - - test "delete_user_whitelist/1 deletes the user_whitelist" do - user_whitelist = user_whitelist_fixture() - assert {:ok, %UserWhitelist{}} = UserWhitelists.delete_user_whitelist(user_whitelist) - assert_raise Ecto.NoResultsError, fn -> UserWhitelists.get_user_whitelist!(user_whitelist.id) end - end - - test "change_user_whitelist/1 returns a user_whitelist changeset" do - user_whitelist = user_whitelist_fixture() - assert %Ecto.Changeset{} = UserWhitelists.change_user_whitelist(user_whitelist) - end - end -end diff --git a/test/philomena/users_test.exs b/test/philomena/users_test.exs deleted file mode 100644 index a1dae1ae..00000000 --- a/test/philomena/users_test.exs +++ /dev/null @@ -1,408 +0,0 @@ -defmodule Philomena.UsersTest do - use Philomena.DataCase - - alias Philomena.Users - - describe "user_ips" do - alias Philomena.Users.Ip - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def ip_fixture(attrs \\ %{}) do - {:ok, ip} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_ip() - - ip - end - - test "list_user_ips/0 returns all user_ips" do - ip = ip_fixture() - assert Users.list_user_ips() == [ip] - end - - test "get_ip!/1 returns the ip with given id" do - ip = ip_fixture() - assert Users.get_ip!(ip.id) == ip - end - - test "create_ip/1 with valid data creates a ip" do - assert {:ok, %Ip{} = ip} = Users.create_ip(@valid_attrs) - end - - test "create_ip/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_ip(@invalid_attrs) - end - - test "update_ip/2 with valid data updates the ip" do - ip = ip_fixture() - assert {:ok, %Ip{} = ip} = Users.update_ip(ip, @update_attrs) - end - - test "update_ip/2 with invalid data returns error changeset" do - ip = ip_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_ip(ip, @invalid_attrs) - assert ip == Users.get_ip!(ip.id) - end - - test "delete_ip/1 deletes the ip" do - ip = ip_fixture() - assert {:ok, %Ip{}} = Users.delete_ip(ip) - assert_raise Ecto.NoResultsError, fn -> Users.get_ip!(ip.id) end - end - - test "change_ip/1 returns a ip changeset" do - ip = ip_fixture() - assert %Ecto.Changeset{} = Users.change_ip(ip) - end - end - - describe "user_fingerprints" do - alias Philomena.Users.Fingerprints - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fingerprints_fixture(attrs \\ %{}) do - {:ok, fingerprints} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_fingerprints() - - fingerprints - end - - test "list_user_fingerprints/0 returns all user_fingerprints" do - fingerprints = fingerprints_fixture() - assert Users.list_user_fingerprints() == [fingerprints] - end - - test "get_fingerprints!/1 returns the fingerprints with given id" do - fingerprints = fingerprints_fixture() - assert Users.get_fingerprints!(fingerprints.id) == fingerprints - end - - test "create_fingerprints/1 with valid data creates a fingerprints" do - assert {:ok, %Fingerprints{} = fingerprints} = Users.create_fingerprints(@valid_attrs) - end - - test "create_fingerprints/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_fingerprints(@invalid_attrs) - end - - test "update_fingerprints/2 with valid data updates the fingerprints" do - fingerprints = fingerprints_fixture() - - assert {:ok, %Fingerprints{} = fingerprints} = - Users.update_fingerprints(fingerprints, @update_attrs) - end - - test "update_fingerprints/2 with invalid data returns error changeset" do - fingerprints = fingerprints_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_fingerprints(fingerprints, @invalid_attrs) - assert fingerprints == Users.get_fingerprints!(fingerprints.id) - end - - test "delete_fingerprints/1 deletes the fingerprints" do - fingerprints = fingerprints_fixture() - assert {:ok, %Fingerprints{}} = Users.delete_fingerprints(fingerprints) - assert_raise Ecto.NoResultsError, fn -> Users.get_fingerprints!(fingerprints.id) end - end - - test "change_fingerprints/1 returns a fingerprints changeset" do - fingerprints = fingerprints_fixture() - assert %Ecto.Changeset{} = Users.change_fingerprints(fingerprints) - end - end - - describe "user_links" do - alias Philomena.Users.Link - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def link_fixture(attrs \\ %{}) do - {:ok, link} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_link() - - link - end - - test "list_user_links/0 returns all user_links" do - link = link_fixture() - assert Users.list_user_links() == [link] - end - - test "get_link!/1 returns the link with given id" do - link = link_fixture() - assert Users.get_link!(link.id) == link - end - - test "create_link/1 with valid data creates a link" do - assert {:ok, %Link{} = link} = Users.create_link(@valid_attrs) - end - - test "create_link/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_link(@invalid_attrs) - end - - test "update_link/2 with valid data updates the link" do - link = link_fixture() - assert {:ok, %Link{} = link} = Users.update_link(link, @update_attrs) - end - - test "update_link/2 with invalid data returns error changeset" do - link = link_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_link(link, @invalid_attrs) - assert link == Users.get_link!(link.id) - end - - test "delete_link/1 deletes the link" do - link = link_fixture() - assert {:ok, %Link{}} = Users.delete_link(link) - assert_raise Ecto.NoResultsError, fn -> Users.get_link!(link.id) end - end - - test "change_link/1 returns a link changeset" do - link = link_fixture() - assert %Ecto.Changeset{} = Users.change_link(link) - end - end - - describe "user_name_changes" do - alias Philomena.Users.NameChange - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def name_change_fixture(attrs \\ %{}) do - {:ok, name_change} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_name_change() - - name_change - end - - test "list_user_name_changes/0 returns all user_name_changes" do - name_change = name_change_fixture() - assert Users.list_user_name_changes() == [name_change] - end - - test "get_name_change!/1 returns the name_change with given id" do - name_change = name_change_fixture() - assert Users.get_name_change!(name_change.id) == name_change - end - - test "create_name_change/1 with valid data creates a name_change" do - assert {:ok, %NameChange{} = name_change} = Users.create_name_change(@valid_attrs) - end - - test "create_name_change/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_name_change(@invalid_attrs) - end - - test "update_name_change/2 with valid data updates the name_change" do - name_change = name_change_fixture() - - assert {:ok, %NameChange{} = name_change} = - Users.update_name_change(name_change, @update_attrs) - end - - test "update_name_change/2 with invalid data returns error changeset" do - name_change = name_change_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_name_change(name_change, @invalid_attrs) - assert name_change == Users.get_name_change!(name_change.id) - end - - test "delete_name_change/1 deletes the name_change" do - name_change = name_change_fixture() - assert {:ok, %NameChange{}} = Users.delete_name_change(name_change) - assert_raise Ecto.NoResultsError, fn -> Users.get_name_change!(name_change.id) end - end - - test "change_name_change/1 returns a name_change changeset" do - name_change = name_change_fixture() - assert %Ecto.Changeset{} = Users.change_name_change(name_change) - end - end - - describe "user_statistics" do - alias Philomena.Users.Statistic - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def statistic_fixture(attrs \\ %{}) do - {:ok, statistic} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_statistic() - - statistic - end - - test "list_user_statistics/0 returns all user_statistics" do - statistic = statistic_fixture() - assert Users.list_user_statistics() == [statistic] - end - - test "get_statistic!/1 returns the statistic with given id" do - statistic = statistic_fixture() - assert Users.get_statistic!(statistic.id) == statistic - end - - test "create_statistic/1 with valid data creates a statistic" do - assert {:ok, %Statistic{} = statistic} = Users.create_statistic(@valid_attrs) - end - - test "create_statistic/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_statistic(@invalid_attrs) - end - - test "update_statistic/2 with valid data updates the statistic" do - statistic = statistic_fixture() - assert {:ok, %Statistic{} = statistic} = Users.update_statistic(statistic, @update_attrs) - end - - test "update_statistic/2 with invalid data returns error changeset" do - statistic = statistic_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_statistic(statistic, @invalid_attrs) - assert statistic == Users.get_statistic!(statistic.id) - end - - test "delete_statistic/1 deletes the statistic" do - statistic = statistic_fixture() - assert {:ok, %Statistic{}} = Users.delete_statistic(statistic) - assert_raise Ecto.NoResultsError, fn -> Users.get_statistic!(statistic.id) end - end - - test "change_statistic/1 returns a statistic changeset" do - statistic = statistic_fixture() - assert %Ecto.Changeset{} = Users.change_statistic(statistic) - end - end - - describe "user_whitelists" do - alias Philomena.Users.Whitelist - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def whitelist_fixture(attrs \\ %{}) do - {:ok, whitelist} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_whitelist() - - whitelist - end - - test "list_user_whitelists/0 returns all user_whitelists" do - whitelist = whitelist_fixture() - assert Users.list_user_whitelists() == [whitelist] - end - - test "get_whitelist!/1 returns the whitelist with given id" do - whitelist = whitelist_fixture() - assert Users.get_whitelist!(whitelist.id) == whitelist - end - - test "create_whitelist/1 with valid data creates a whitelist" do - assert {:ok, %Whitelist{} = whitelist} = Users.create_whitelist(@valid_attrs) - end - - test "create_whitelist/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_whitelist(@invalid_attrs) - end - - test "update_whitelist/2 with valid data updates the whitelist" do - whitelist = whitelist_fixture() - assert {:ok, %Whitelist{} = whitelist} = Users.update_whitelist(whitelist, @update_attrs) - end - - test "update_whitelist/2 with invalid data returns error changeset" do - whitelist = whitelist_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_whitelist(whitelist, @invalid_attrs) - assert whitelist == Users.get_whitelist!(whitelist.id) - end - - test "delete_whitelist/1 deletes the whitelist" do - whitelist = whitelist_fixture() - assert {:ok, %Whitelist{}} = Users.delete_whitelist(whitelist) - assert_raise Ecto.NoResultsError, fn -> Users.get_whitelist!(whitelist.id) end - end - - test "change_whitelist/1 returns a whitelist changeset" do - whitelist = whitelist_fixture() - assert %Ecto.Changeset{} = Users.change_whitelist(whitelist) - end - end - - describe "users_roles" do - alias Philomena.Users.Role - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def role_fixture(attrs \\ %{}) do - {:ok, role} = - attrs - |> Enum.into(@valid_attrs) - |> Users.create_role() - - role - end - - test "list_users_roles/0 returns all users_roles" do - role = role_fixture() - assert Users.list_users_roles() == [role] - end - - test "get_role!/1 returns the role with given id" do - role = role_fixture() - assert Users.get_role!(role.id) == role - end - - test "create_role/1 with valid data creates a role" do - assert {:ok, %Role{} = role} = Users.create_role(@valid_attrs) - end - - test "create_role/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Users.create_role(@invalid_attrs) - end - - test "update_role/2 with valid data updates the role" do - role = role_fixture() - assert {:ok, %Role{} = role} = Users.update_role(role, @update_attrs) - end - - test "update_role/2 with invalid data returns error changeset" do - role = role_fixture() - assert {:error, %Ecto.Changeset{}} = Users.update_role(role, @invalid_attrs) - assert role == Users.get_role!(role.id) - end - - test "delete_role/1 deletes the role" do - role = role_fixture() - assert {:ok, %Role{}} = Users.delete_role(role) - assert_raise Ecto.NoResultsError, fn -> Users.get_role!(role.id) end - end - - test "change_role/1 returns a role changeset" do - role = role_fixture() - assert %Ecto.Changeset{} = Users.change_role(role) - end - end -end diff --git a/test/philomena/versions_test.exs b/test/philomena/versions_test.exs deleted file mode 100644 index 6432b7c8..00000000 --- a/test/philomena/versions_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.VersionsTest do - use Philomena.DataCase - - alias Philomena.Versions - - describe "versions" do - alias Philomena.Versions.Version - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def version_fixture(attrs \\ %{}) do - {:ok, version} = - attrs - |> Enum.into(@valid_attrs) - |> Versions.create_version() - - version - end - - test "list_versions/0 returns all versions" do - version = version_fixture() - assert Versions.list_versions() == [version] - end - - test "get_version!/1 returns the version with given id" do - version = version_fixture() - assert Versions.get_version!(version.id) == version - end - - test "create_version/1 with valid data creates a version" do - assert {:ok, %Version{} = version} = Versions.create_version(@valid_attrs) - end - - test "create_version/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Versions.create_version(@invalid_attrs) - end - - test "update_version/2 with valid data updates the version" do - version = version_fixture() - assert {:ok, %Version{} = version} = Versions.update_version(version, @update_attrs) - end - - test "update_version/2 with invalid data returns error changeset" do - version = version_fixture() - assert {:error, %Ecto.Changeset{}} = Versions.update_version(version, @invalid_attrs) - assert version == Versions.get_version!(version.id) - end - - test "delete_version/1 deletes the version" do - version = version_fixture() - assert {:ok, %Version{}} = Versions.delete_version(version) - assert_raise Ecto.NoResultsError, fn -> Versions.get_version!(version.id) end - end - - test "change_version/1 returns a version changeset" do - version = version_fixture() - assert %Ecto.Changeset{} = Versions.change_version(version) - end - end -end diff --git a/test/philomena/vpns_test.exs b/test/philomena/vpns_test.exs deleted file mode 100644 index 7a76b2d4..00000000 --- a/test/philomena/vpns_test.exs +++ /dev/null @@ -1,62 +0,0 @@ -defmodule Philomena.VpnsTest do - use Philomena.DataCase - - alias Philomena.Vpns - - describe "vpns" do - alias Philomena.Vpns.Vpn - - @valid_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def vpn_fixture(attrs \\ %{}) do - {:ok, vpn} = - attrs - |> Enum.into(@valid_attrs) - |> Vpns.create_vpn() - - vpn - end - - test "list_vpns/0 returns all vpns" do - vpn = vpn_fixture() - assert Vpns.list_vpns() == [vpn] - end - - test "get_vpn!/1 returns the vpn with given id" do - vpn = vpn_fixture() - assert Vpns.get_vpn!(vpn.id) == vpn - end - - test "create_vpn/1 with valid data creates a vpn" do - assert {:ok, %Vpn{} = vpn} = Vpns.create_vpn(@valid_attrs) - end - - test "create_vpn/1 with invalid data returns error changeset" do - assert {:error, %Ecto.Changeset{}} = Vpns.create_vpn(@invalid_attrs) - end - - test "update_vpn/2 with valid data updates the vpn" do - vpn = vpn_fixture() - assert {:ok, %Vpn{} = vpn} = Vpns.update_vpn(vpn, @update_attrs) - end - - test "update_vpn/2 with invalid data returns error changeset" do - vpn = vpn_fixture() - assert {:error, %Ecto.Changeset{}} = Vpns.update_vpn(vpn, @invalid_attrs) - assert vpn == Vpns.get_vpn!(vpn.id) - end - - test "delete_vpn/1 deletes the vpn" do - vpn = vpn_fixture() - assert {:ok, %Vpn{}} = Vpns.delete_vpn(vpn) - assert_raise Ecto.NoResultsError, fn -> Vpns.get_vpn!(vpn.id) end - end - - test "change_vpn/1 returns a vpn changeset" do - vpn = vpn_fixture() - assert %Ecto.Changeset{} = Vpns.change_vpn(vpn) - end - end -end diff --git a/test/philomena_web/controllers/channel_controller_test.exs b/test/philomena_web/controllers/channel_controller_test.exs deleted file mode 100644 index f1b9b008..00000000 --- a/test/philomena_web/controllers/channel_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.ChannelControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Channels - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:channel) do - {:ok, channel} = Channels.create_channel(@create_attrs) - channel - end - - describe "index" do - test "lists all channels", %{conn: conn} do - conn = get(conn, Routes.channel_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Channels" - end - end - - describe "new channel" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.channel_path(conn, :new)) - assert html_response(conn, 200) =~ "New Channel" - end - end - - describe "create channel" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.channel_path(conn, :create), channel: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.channel_path(conn, :show, id) - - conn = get(conn, Routes.channel_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Channel" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.channel_path(conn, :create), channel: @invalid_attrs) - assert html_response(conn, 200) =~ "New Channel" - end - end - - describe "edit channel" do - setup [:create_channel] - - test "renders form for editing chosen channel", %{conn: conn, channel: channel} do - conn = get(conn, Routes.channel_path(conn, :edit, channel)) - assert html_response(conn, 200) =~ "Edit Channel" - end - end - - describe "update channel" do - setup [:create_channel] - - test "redirects when data is valid", %{conn: conn, channel: channel} do - conn = put(conn, Routes.channel_path(conn, :update, channel), channel: @update_attrs) - assert redirected_to(conn) == Routes.channel_path(conn, :show, channel) - - conn = get(conn, Routes.channel_path(conn, :show, channel)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, channel: channel} do - conn = put(conn, Routes.channel_path(conn, :update, channel), channel: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Channel" - end - end - - describe "delete channel" do - setup [:create_channel] - - test "deletes chosen channel", %{conn: conn, channel: channel} do - conn = delete(conn, Routes.channel_path(conn, :delete, channel)) - assert redirected_to(conn) == Routes.channel_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.channel_path(conn, :show, channel)) - end - end - end - - defp create_channel(_) do - channel = fixture(:channel) - {:ok, channel: channel} - end -end diff --git a/test/philomena_web/controllers/comment_controller_test.exs b/test/philomena_web/controllers/comment_controller_test.exs deleted file mode 100644 index 1fd73c8b..00000000 --- a/test/philomena_web/controllers/comment_controller_test.exs +++ /dev/null @@ -1,89 +0,0 @@ -defmodule PhilomenaWeb.CommentControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Comments - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:comment) do - {:ok, comment} = Comments.create_comment(@create_attrs) - comment - end - - describe "index" do - test "lists all comments", %{conn: conn} do - conn = get(conn, Routes.comment_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Comments" - end - end - - describe "new comment" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.comment_path(conn, :new)) - assert html_response(conn, 200) =~ "New Comment" - end - end - - describe "create comment" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.comment_path(conn, :create), comment: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.comment_path(conn, :show, id) - - conn = get(conn, Routes.comment_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Comment" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.comment_path(conn, :create), comment: @invalid_attrs) - assert html_response(conn, 200) =~ "New Comment" - end - end - - describe "edit comment" do - setup [:create_comment] - - test "renders form for editing chosen comment", %{conn: conn, comment: comment} do - conn = get(conn, Routes.comment_path(conn, :edit, comment)) - assert html_response(conn, 200) =~ "Edit Comment" - end - end - - describe "update comment" do - setup [:create_comment] - - test "redirects when data is valid", %{conn: conn, comment: comment} do - conn = put(conn, Routes.comment_path(conn, :update, comment), comment: @update_attrs) - assert redirected_to(conn) == Routes.comment_path(conn, :show, comment) - - conn = get(conn, Routes.comment_path(conn, :show, comment)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, comment: comment} do - conn = put(conn, Routes.comment_path(conn, :update, comment), comment: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Comment" - end - end - - describe "delete comment" do - setup [:create_comment] - - test "deletes chosen comment", %{conn: conn, comment: comment} do - conn = delete(conn, Routes.comment_path(conn, :delete, comment)) - assert redirected_to(conn) == Routes.comment_path(conn, :index) - - assert_error_sent 404, fn -> - get(conn, Routes.comment_path(conn, :show, comment)) - end - end - end - - defp create_comment(_) do - comment = fixture(:comment) - {:ok, comment: comment} - end -end diff --git a/test/philomena_web/controllers/dnp_entry_controller_test.exs b/test/philomena_web/controllers/dnp_entry_controller_test.exs deleted file mode 100644 index cd004a1d..00000000 --- a/test/philomena_web/controllers/dnp_entry_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.DnpEntryControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.DnpEntries - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:dnp_entry) do - {:ok, dnp_entry} = DnpEntries.create_dnp_entry(@create_attrs) - dnp_entry - end - - describe "index" do - test "lists all dnp_entries", %{conn: conn} do - conn = get(conn, Routes.dnp_entry_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Dnp entries" - end - end - - describe "new dnp_entry" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.dnp_entry_path(conn, :new)) - assert html_response(conn, 200) =~ "New Dnp entry" - end - end - - describe "create dnp_entry" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.dnp_entry_path(conn, :create), dnp_entry: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.dnp_entry_path(conn, :show, id) - - conn = get(conn, Routes.dnp_entry_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Dnp entry" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.dnp_entry_path(conn, :create), dnp_entry: @invalid_attrs) - assert html_response(conn, 200) =~ "New Dnp entry" - end - end - - describe "edit dnp_entry" do - setup [:create_dnp_entry] - - test "renders form for editing chosen dnp_entry", %{conn: conn, dnp_entry: dnp_entry} do - conn = get(conn, Routes.dnp_entry_path(conn, :edit, dnp_entry)) - assert html_response(conn, 200) =~ "Edit Dnp entry" - end - end - - describe "update dnp_entry" do - setup [:create_dnp_entry] - - test "redirects when data is valid", %{conn: conn, dnp_entry: dnp_entry} do - conn = put(conn, Routes.dnp_entry_path(conn, :update, dnp_entry), dnp_entry: @update_attrs) - assert redirected_to(conn) == Routes.dnp_entry_path(conn, :show, dnp_entry) - - conn = get(conn, Routes.dnp_entry_path(conn, :show, dnp_entry)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, dnp_entry: dnp_entry} do - conn = put(conn, Routes.dnp_entry_path(conn, :update, dnp_entry), dnp_entry: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Dnp entry" - end - end - - describe "delete dnp_entry" do - setup [:create_dnp_entry] - - test "deletes chosen dnp_entry", %{conn: conn, dnp_entry: dnp_entry} do - conn = delete(conn, Routes.dnp_entry_path(conn, :delete, dnp_entry)) - assert redirected_to(conn) == Routes.dnp_entry_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.dnp_entry_path(conn, :show, dnp_entry)) - end - end - end - - defp create_dnp_entry(_) do - dnp_entry = fixture(:dnp_entry) - {:ok, dnp_entry: dnp_entry} - end -end diff --git a/test/philomena_web/controllers/duplicate_report_controller_test.exs b/test/philomena_web/controllers/duplicate_report_controller_test.exs deleted file mode 100644 index 6e8e59d5..00000000 --- a/test/philomena_web/controllers/duplicate_report_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.DuplicateReportControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.DuplicateReports - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:duplicate_report) do - {:ok, duplicate_report} = DuplicateReports.create_duplicate_report(@create_attrs) - duplicate_report - end - - describe "index" do - test "lists all duplicate_reports", %{conn: conn} do - conn = get(conn, Routes.duplicate_report_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Duplicate reports" - end - end - - describe "new duplicate_report" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.duplicate_report_path(conn, :new)) - assert html_response(conn, 200) =~ "New Duplicate report" - end - end - - describe "create duplicate_report" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.duplicate_report_path(conn, :create), duplicate_report: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.duplicate_report_path(conn, :show, id) - - conn = get(conn, Routes.duplicate_report_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Duplicate report" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.duplicate_report_path(conn, :create), duplicate_report: @invalid_attrs) - assert html_response(conn, 200) =~ "New Duplicate report" - end - end - - describe "edit duplicate_report" do - setup [:create_duplicate_report] - - test "renders form for editing chosen duplicate_report", %{conn: conn, duplicate_report: duplicate_report} do - conn = get(conn, Routes.duplicate_report_path(conn, :edit, duplicate_report)) - assert html_response(conn, 200) =~ "Edit Duplicate report" - end - end - - describe "update duplicate_report" do - setup [:create_duplicate_report] - - test "redirects when data is valid", %{conn: conn, duplicate_report: duplicate_report} do - conn = put(conn, Routes.duplicate_report_path(conn, :update, duplicate_report), duplicate_report: @update_attrs) - assert redirected_to(conn) == Routes.duplicate_report_path(conn, :show, duplicate_report) - - conn = get(conn, Routes.duplicate_report_path(conn, :show, duplicate_report)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, duplicate_report: duplicate_report} do - conn = put(conn, Routes.duplicate_report_path(conn, :update, duplicate_report), duplicate_report: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Duplicate report" - end - end - - describe "delete duplicate_report" do - setup [:create_duplicate_report] - - test "deletes chosen duplicate_report", %{conn: conn, duplicate_report: duplicate_report} do - conn = delete(conn, Routes.duplicate_report_path(conn, :delete, duplicate_report)) - assert redirected_to(conn) == Routes.duplicate_report_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.duplicate_report_path(conn, :show, duplicate_report)) - end - end - end - - defp create_duplicate_report(_) do - duplicate_report = fixture(:duplicate_report) - {:ok, duplicate_report: duplicate_report} - end -end diff --git a/test/philomena_web/controllers/image_controller_test.exs b/test/philomena_web/controllers/image_controller_test.exs deleted file mode 100644 index 28f1c33d..00000000 --- a/test/philomena_web/controllers/image_controller_test.exs +++ /dev/null @@ -1,89 +0,0 @@ -defmodule PhilomenaWeb.ImageControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Images - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:image) do - {:ok, image} = Images.create_image(@create_attrs) - image - end - - describe "index" do - test "lists all images", %{conn: conn} do - conn = get(conn, Routes.image_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Images" - end - end - - describe "new image" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.image_path(conn, :new)) - assert html_response(conn, 200) =~ "New Image" - end - end - - describe "create image" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.image_path(conn, :create), image: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.image_path(conn, :show, id) - - conn = get(conn, Routes.image_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Image" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.image_path(conn, :create), image: @invalid_attrs) - assert html_response(conn, 200) =~ "New Image" - end - end - - describe "edit image" do - setup [:create_image] - - test "renders form for editing chosen image", %{conn: conn, image: image} do - conn = get(conn, Routes.image_path(conn, :edit, image)) - assert html_response(conn, 200) =~ "Edit Image" - end - end - - describe "update image" do - setup [:create_image] - - test "redirects when data is valid", %{conn: conn, image: image} do - conn = put(conn, Routes.image_path(conn, :update, image), image: @update_attrs) - assert redirected_to(conn) == Routes.image_path(conn, :show, image) - - conn = get(conn, Routes.image_path(conn, :show, image)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, image: image} do - conn = put(conn, Routes.image_path(conn, :update, image), image: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Image" - end - end - - describe "delete image" do - setup [:create_image] - - test "deletes chosen image", %{conn: conn, image: image} do - conn = delete(conn, Routes.image_path(conn, :delete, image)) - assert redirected_to(conn) == Routes.image_path(conn, :index) - - assert_error_sent 404, fn -> - get(conn, Routes.image_path(conn, :show, image)) - end - end - end - - defp create_image(_) do - image = fixture(:image) - {:ok, image: image} - end -end diff --git a/test/philomena_web/controllers/page_controller_test.exs b/test/philomena_web/controllers/page_controller_test.exs deleted file mode 100644 index 7546111f..00000000 --- a/test/philomena_web/controllers/page_controller_test.exs +++ /dev/null @@ -1,8 +0,0 @@ -defmodule PhilomenaWeb.PageControllerTest do - use PhilomenaWeb.ConnCase - - test "GET /", %{conn: conn} do - conn = get(conn, "/") - assert html_response(conn, 200) =~ "Welcome to Phoenix!" - end -end diff --git a/test/philomena_web/controllers/setting_controller_test.exs b/test/philomena_web/controllers/setting_controller_test.exs deleted file mode 100644 index 90227711..00000000 --- a/test/philomena_web/controllers/setting_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.SettingControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Settings - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:setting) do - {:ok, setting} = Settings.create_setting(@create_attrs) - setting - end - - describe "index" do - test "lists all settings", %{conn: conn} do - conn = get(conn, Routes.setting_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Settings" - end - end - - describe "new setting" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.setting_path(conn, :new)) - assert html_response(conn, 200) =~ "New Setting" - end - end - - describe "create setting" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.setting_path(conn, :create), setting: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.setting_path(conn, :show, id) - - conn = get(conn, Routes.setting_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Setting" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.setting_path(conn, :create), setting: @invalid_attrs) - assert html_response(conn, 200) =~ "New Setting" - end - end - - describe "edit setting" do - setup [:create_setting] - - test "renders form for editing chosen setting", %{conn: conn, setting: setting} do - conn = get(conn, Routes.setting_path(conn, :edit, setting)) - assert html_response(conn, 200) =~ "Edit Setting" - end - end - - describe "update setting" do - setup [:create_setting] - - test "redirects when data is valid", %{conn: conn, setting: setting} do - conn = put(conn, Routes.setting_path(conn, :update, setting), setting: @update_attrs) - assert redirected_to(conn) == Routes.setting_path(conn, :show, setting) - - conn = get(conn, Routes.setting_path(conn, :show, setting)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, setting: setting} do - conn = put(conn, Routes.setting_path(conn, :update, setting), setting: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Setting" - end - end - - describe "delete setting" do - setup [:create_setting] - - test "deletes chosen setting", %{conn: conn, setting: setting} do - conn = delete(conn, Routes.setting_path(conn, :delete, setting)) - assert redirected_to(conn) == Routes.setting_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.setting_path(conn, :show, setting)) - end - end - end - - defp create_setting(_) do - setting = fixture(:setting) - {:ok, setting: setting} - end -end diff --git a/test/philomena_web/controllers/staff_controller_test.exs b/test/philomena_web/controllers/staff_controller_test.exs deleted file mode 100644 index fbdfeeb2..00000000 --- a/test/philomena_web/controllers/staff_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.StaffControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Staffs - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:staff) do - {:ok, staff} = Staffs.create_staff(@create_attrs) - staff - end - - describe "index" do - test "lists all staffs", %{conn: conn} do - conn = get(conn, Routes.staff_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Staffs" - end - end - - describe "new staff" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.staff_path(conn, :new)) - assert html_response(conn, 200) =~ "New Staff" - end - end - - describe "create staff" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.staff_path(conn, :create), staff: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.staff_path(conn, :show, id) - - conn = get(conn, Routes.staff_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Staff" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.staff_path(conn, :create), staff: @invalid_attrs) - assert html_response(conn, 200) =~ "New Staff" - end - end - - describe "edit staff" do - setup [:create_staff] - - test "renders form for editing chosen staff", %{conn: conn, staff: staff} do - conn = get(conn, Routes.staff_path(conn, :edit, staff)) - assert html_response(conn, 200) =~ "Edit Staff" - end - end - - describe "update staff" do - setup [:create_staff] - - test "redirects when data is valid", %{conn: conn, staff: staff} do - conn = put(conn, Routes.staff_path(conn, :update, staff), staff: @update_attrs) - assert redirected_to(conn) == Routes.staff_path(conn, :show, staff) - - conn = get(conn, Routes.staff_path(conn, :show, staff)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, staff: staff} do - conn = put(conn, Routes.staff_path(conn, :update, staff), staff: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Staff" - end - end - - describe "delete staff" do - setup [:create_staff] - - test "deletes chosen staff", %{conn: conn, staff: staff} do - conn = delete(conn, Routes.staff_path(conn, :delete, staff)) - assert redirected_to(conn) == Routes.staff_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.staff_path(conn, :show, staff)) - end - end - end - - defp create_staff(_) do - staff = fixture(:staff) - {:ok, staff: staff} - end -end diff --git a/test/philomena_web/controllers/stat_controller_test.exs b/test/philomena_web/controllers/stat_controller_test.exs deleted file mode 100644 index 708ea20d..00000000 --- a/test/philomena_web/controllers/stat_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.StatControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Stats - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:stat) do - {:ok, stat} = Stats.create_stat(@create_attrs) - stat - end - - describe "index" do - test "lists all stats", %{conn: conn} do - conn = get(conn, Routes.stat_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Stats" - end - end - - describe "new stat" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.stat_path(conn, :new)) - assert html_response(conn, 200) =~ "New Stat" - end - end - - describe "create stat" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.stat_path(conn, :create), stat: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.stat_path(conn, :show, id) - - conn = get(conn, Routes.stat_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Stat" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.stat_path(conn, :create), stat: @invalid_attrs) - assert html_response(conn, 200) =~ "New Stat" - end - end - - describe "edit stat" do - setup [:create_stat] - - test "renders form for editing chosen stat", %{conn: conn, stat: stat} do - conn = get(conn, Routes.stat_path(conn, :edit, stat)) - assert html_response(conn, 200) =~ "Edit Stat" - end - end - - describe "update stat" do - setup [:create_stat] - - test "redirects when data is valid", %{conn: conn, stat: stat} do - conn = put(conn, Routes.stat_path(conn, :update, stat), stat: @update_attrs) - assert redirected_to(conn) == Routes.stat_path(conn, :show, stat) - - conn = get(conn, Routes.stat_path(conn, :show, stat)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, stat: stat} do - conn = put(conn, Routes.stat_path(conn, :update, stat), stat: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Stat" - end - end - - describe "delete stat" do - setup [:create_stat] - - test "deletes chosen stat", %{conn: conn, stat: stat} do - conn = delete(conn, Routes.stat_path(conn, :delete, stat)) - assert redirected_to(conn) == Routes.stat_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.stat_path(conn, :show, stat)) - end - end - end - - defp create_stat(_) do - stat = fixture(:stat) - {:ok, stat: stat} - end -end diff --git a/test/philomena_web/controllers/tag_controller_test.exs b/test/philomena_web/controllers/tag_controller_test.exs deleted file mode 100644 index f5143c32..00000000 --- a/test/philomena_web/controllers/tag_controller_test.exs +++ /dev/null @@ -1,89 +0,0 @@ -defmodule PhilomenaWeb.TagControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.Tags - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:tag) do - {:ok, tag} = Tags.create_tag(@create_attrs) - tag - end - - describe "index" do - test "lists all tags", %{conn: conn} do - conn = get(conn, Routes.tag_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing Tags" - end - end - - describe "new tag" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.tag_path(conn, :new)) - assert html_response(conn, 200) =~ "New Tag" - end - end - - describe "create tag" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.tag_path(conn, :create), tag: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.tag_path(conn, :show, id) - - conn = get(conn, Routes.tag_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show Tag" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.tag_path(conn, :create), tag: @invalid_attrs) - assert html_response(conn, 200) =~ "New Tag" - end - end - - describe "edit tag" do - setup [:create_tag] - - test "renders form for editing chosen tag", %{conn: conn, tag: tag} do - conn = get(conn, Routes.tag_path(conn, :edit, tag)) - assert html_response(conn, 200) =~ "Edit Tag" - end - end - - describe "update tag" do - setup [:create_tag] - - test "redirects when data is valid", %{conn: conn, tag: tag} do - conn = put(conn, Routes.tag_path(conn, :update, tag), tag: @update_attrs) - assert redirected_to(conn) == Routes.tag_path(conn, :show, tag) - - conn = get(conn, Routes.tag_path(conn, :show, tag)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, tag: tag} do - conn = put(conn, Routes.tag_path(conn, :update, tag), tag: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit Tag" - end - end - - describe "delete tag" do - setup [:create_tag] - - test "deletes chosen tag", %{conn: conn, tag: tag} do - conn = delete(conn, Routes.tag_path(conn, :delete, tag)) - assert redirected_to(conn) == Routes.tag_path(conn, :index) - - assert_error_sent 404, fn -> - get(conn, Routes.tag_path(conn, :show, tag)) - end - end - end - - defp create_tag(_) do - tag = fixture(:tag) - {:ok, tag: tag} - end -end diff --git a/test/philomena_web/controllers/user_link_controller_test.exs b/test/philomena_web/controllers/user_link_controller_test.exs deleted file mode 100644 index 7c0ca68a..00000000 --- a/test/philomena_web/controllers/user_link_controller_test.exs +++ /dev/null @@ -1,88 +0,0 @@ -defmodule PhilomenaWeb.UserLinkControllerTest do - use PhilomenaWeb.ConnCase - - alias Philomena.UserLinks - - @create_attrs %{} - @update_attrs %{} - @invalid_attrs %{} - - def fixture(:user_link) do - {:ok, user_link} = UserLinks.create_user_link(@create_attrs) - user_link - end - - describe "index" do - test "lists all user_links", %{conn: conn} do - conn = get(conn, Routes.user_link_path(conn, :index)) - assert html_response(conn, 200) =~ "Listing User links" - end - end - - describe "new user_link" do - test "renders form", %{conn: conn} do - conn = get(conn, Routes.user_link_path(conn, :new)) - assert html_response(conn, 200) =~ "New User link" - end - end - - describe "create user_link" do - test "redirects to show when data is valid", %{conn: conn} do - conn = post(conn, Routes.user_link_path(conn, :create), user_link: @create_attrs) - - assert %{id: id} = redirected_params(conn) - assert redirected_to(conn) == Routes.user_link_path(conn, :show, id) - - conn = get(conn, Routes.user_link_path(conn, :show, id)) - assert html_response(conn, 200) =~ "Show User link" - end - - test "renders errors when data is invalid", %{conn: conn} do - conn = post(conn, Routes.user_link_path(conn, :create), user_link: @invalid_attrs) - assert html_response(conn, 200) =~ "New User link" - end - end - - describe "edit user_link" do - setup [:create_user_link] - - test "renders form for editing chosen user_link", %{conn: conn, user_link: user_link} do - conn = get(conn, Routes.user_link_path(conn, :edit, user_link)) - assert html_response(conn, 200) =~ "Edit User link" - end - end - - describe "update user_link" do - setup [:create_user_link] - - test "redirects when data is valid", %{conn: conn, user_link: user_link} do - conn = put(conn, Routes.user_link_path(conn, :update, user_link), user_link: @update_attrs) - assert redirected_to(conn) == Routes.user_link_path(conn, :show, user_link) - - conn = get(conn, Routes.user_link_path(conn, :show, user_link)) - assert html_response(conn, 200) - end - - test "renders errors when data is invalid", %{conn: conn, user_link: user_link} do - conn = put(conn, Routes.user_link_path(conn, :update, user_link), user_link: @invalid_attrs) - assert html_response(conn, 200) =~ "Edit User link" - end - end - - describe "delete user_link" do - setup [:create_user_link] - - test "deletes chosen user_link", %{conn: conn, user_link: user_link} do - conn = delete(conn, Routes.user_link_path(conn, :delete, user_link)) - assert redirected_to(conn) == Routes.user_link_path(conn, :index) - assert_error_sent 404, fn -> - get(conn, Routes.user_link_path(conn, :show, user_link)) - end - end - end - - defp create_user_link(_) do - user_link = fixture(:user_link) - {:ok, user_link: user_link} - end -end diff --git a/test/philomena_web/views/error_view_test.exs b/test/philomena_web/views/error_view_test.exs deleted file mode 100644 index 55a8ce86..00000000 --- a/test/philomena_web/views/error_view_test.exs +++ /dev/null @@ -1,14 +0,0 @@ -defmodule PhilomenaWeb.ErrorViewTest do - use PhilomenaWeb.ConnCase, async: true - - # Bring render/3 and render_to_string/3 for testing custom views - import Phoenix.View - - test "renders 404.html" do - assert render_to_string(PhilomenaWeb.ErrorView, "404.html", []) == "Not Found" - end - - test "renders 500.html" do - assert render_to_string(PhilomenaWeb.ErrorView, "500.html", []) == "Internal Server Error" - end -end diff --git a/test/philomena_web/views/layout_view_test.exs b/test/philomena_web/views/layout_view_test.exs deleted file mode 100644 index d001aa07..00000000 --- a/test/philomena_web/views/layout_view_test.exs +++ /dev/null @@ -1,3 +0,0 @@ -defmodule PhilomenaWeb.LayoutViewTest do - use PhilomenaWeb.ConnCase, async: true -end diff --git a/test/philomena_web/views/page_view_test.exs b/test/philomena_web/views/page_view_test.exs deleted file mode 100644 index 6b3edf3a..00000000 --- a/test/philomena_web/views/page_view_test.exs +++ /dev/null @@ -1,3 +0,0 @@ -defmodule PhilomenaWeb.PageViewTest do - use PhilomenaWeb.ConnCase, async: true -end