Skip to content

Commit

Permalink
test care team for returns expected data from DB. #1
Browse files Browse the repository at this point in the history
  • Loading branch information
RobStallion committed Jul 28, 2017
1 parent fe0ef11 commit bf691ab
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/lib/care_team_test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
defmodule EpjsApp.CareTeamTest do
use EpjsApp.ModelCase, async: true
alias EpjsApp.{CareTeam, EPJSTeamMember, Repo}

setup %{} do
Repo.insert!(%EPJSTeamMember{
Patient_ID: 123,
Staff_ID: 321,
Staff_Name: "rob stallion",
Job_Title: "clinician",
Team_Member_Role_Desc: "care team lead",
Email: "[email protected]",
User_Guid: "1234567890"
})

:ok
end

describe "CareTeam for function" do
test "gets care team for a user from the database" do
clinician_email =
CareTeam.for(%{slam_id: 123})
|> Enum.at(0)
|> Map.get(:Email)
assert clinician_email == "[email protected]"
end
end
end

0 comments on commit bf691ab

Please sign in to comment.