Skip to content

Commit

Permalink
add tests for correct syncing when opening a pull_request
Browse files Browse the repository at this point in the history
  • Loading branch information
zacck committed Feb 28, 2018
1 parent 6463cd6 commit 53bf959
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/lib/code_corps/github/sync/sync_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ defmodule CodeCorps.GitHub.SyncTest do

alias Ecto.Changeset

describe "pull_request_event/1 opened" do
@payload load_event_fixture("pull_request_opened")

test "syncs correctly with valid data when opening" do
project = insert(:project)
insert(:github_repo, github_id: @payload["repository"]["id"], project: project)
insert(:task_list, project: project, done: true)
insert(:task_list, project: project, inbox: true)
insert(:task_list, project: project, pull_requests: true)
{:ok, _map} = Sync.pull_request_event(@payload)
end
end

describe "installation_repositories_event/1 added" do

@payload load_event_fixture("installation_repositories_added")
Expand Down

0 comments on commit 53bf959

Please sign in to comment.