   end
 
   test "Retrieve all builds of project" do
-    p = %Project{}
+    {:ok, p} = %Project{}
+    |> Project.changeset(unique_project @valid_p_attrs)
+    |> Builds.insert_project()
     Logger.debug "p = #{inspect p}"
     bs = Builds.builds_for_project(p)
     assert bs == []

      assert project.id == p.id
      assert p.last_build == b
    end)
  end

  test "Retrieve all projects" do

  end

  test "add a build with several states" do
    {:ok, project} = %Project{}
    |> Project.changeset(unique_project @valid_p_attrs)
    |> Builds.insert_project()
    coord = "/tmp"
    |> NoopPlugin.make_coordinate()
    |> Map.put(:project_name, project.name)
