1- defmodule CodeCorps.GitHub.Event.Installation .ChangesetTest do
1+ defmodule CodeCorps.GitHub.Event.GithubAppInstallation .ChangesetTest do
22 @ moduledoc false
33
44 use CodeCorps.DbAccessCase
55
66 import CodeCorps.GitHub.TestHelpers
77 alias CodeCorps . {
8- GitHub.Sync.Installation ,
8+ GitHub.Sync ,
99 GithubAppInstallation
1010 }
1111 alias Ecto.Changeset
@@ -15,7 +15,8 @@ defmodule CodeCorps.GitHub.Event.Installation.ChangesetTest do
1515 test "assigns correct changes" do
1616 payload = load_event_fixture ( "installation_created" )
1717
18- changeset = payload |> Installation.Changeset . create_changeset ( )
18+ changeset =
19+ payload |> Sync.GithubAppInstallation.Changeset . create_changeset ( )
1920
2021 assert changeset |> Changeset . get_change ( :github_id ) == payload [ "installation" ] [ "id" ]
2122 assert changeset |> Changeset . get_change ( :github_account_id ) == payload [ "installation" ] [ "account" ] [ "id" ]
@@ -34,7 +35,8 @@ defmodule CodeCorps.GitHub.Event.Installation.ChangesetTest do
3435 payload = load_event_fixture ( "installation_created" )
3536 user = insert ( :user )
3637
37- changeset = payload |> Installation.Changeset . create_changeset ( user )
38+ changeset =
39+ payload |> Sync.GithubAppInstallation.Changeset . create_changeset ( user )
3840
3941 assert changeset |> Changeset . get_change ( :user ) |> Map . get ( :data ) == user
4042 assert changeset . valid?
@@ -47,7 +49,8 @@ defmodule CodeCorps.GitHub.Event.Installation.ChangesetTest do
4749 github_app_installation = % GithubAppInstallation { }
4850
4951 changeset =
50- github_app_installation |> Installation.Changeset . update_changeset ( payload )
52+ github_app_installation
53+ |> Sync.GithubAppInstallation.Changeset . update_changeset ( payload )
5154
5255 assert changeset |> Changeset . get_change ( :github_id ) == payload [ "installation" ] [ "id" ]
5356 assert changeset |> Changeset . get_change ( :github_account_id ) == payload [ "installation" ] [ "account" ] [ "id" ]
0 commit comments