   describe "events" do
     alias CoursePlanner.Events.Event
 
-    @valid_attrs %{date: ~D[2010-04-17], description: "some description", finishing_time: ~T[15:00:00.000000], location: "some location", name: "some name", starting_time: ~T[14:00:00.000000]}
-    @update_attrs %{date: ~D[2011-05-18], description: "some updated description", finishing_time: ~T[15:01:01.000000], location: "some updated location", name: "some updated name", starting_time: ~T[14:01:01.000000]}
+    @today Timex.today()
+    @now Timex.now()
+    @valid_attrs %{date: @today, description: "some description", finishing_time: ~T[15:00:00.000000], location: "some location", name: "some name", starting_time: ~T[14:00:00.000000]}
+    @update_attrs %{date: @today, description: "some updated description", finishing_time: ~T[15:01:01.000000], location: "some updated location", name: "some updated name", starting_time: ~T[14:01:01.000000]}
     @invalid_attrs %{date: nil, description: nil, finishing_time: nil, location: nil, name: nil, starting_time: nil}
 
     test "all/0 returns all events" do


    test "create/1 with valid data creates a event" do
      assert {:ok, %Event{} = event} = Events.create(@valid_attrs)
      assert event.date == ~D[2010-04-17]
      assert event.description == "some description"
      assert event.finishing_time == ~T[15:00:00.000000]
      assert event.location == "some location"

      event = insert(:event)
      assert {:ok, event} = Events.update(event, @update_attrs)
      assert %Event{} = event
      assert event.date == @today
      assert event.description == "some updated description"
      assert event.finishing_time == ~T[15:01:01.000000]
      assert event.location == "some updated location"
