@@ -28,14 +28,14 @@ defmodule SqlitexTest do
2828 test "server basic query" do
2929 { :ok , conn } = Sqlitex.Server . start_link ( @ shared_cache )
3030 { :ok , [ row ] } = Sqlitex.Server . query ( conn , "SELECT * FROM players ORDER BY id LIMIT 1" )
31- assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
31+ assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
3232 Sqlitex.Server . stop ( conn )
3333 end
3434
3535 test "server basic query by name" do
3636 { :ok , _ } = Sqlitex.Server . start_link ( @ shared_cache , name: :sql )
3737 { :ok , [ row ] } = Sqlitex.Server . query ( :sql , "SELECT * FROM players ORDER BY id LIMIT 1" )
38- assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
38+ assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
3939 Sqlitex.Server . stop ( :sql )
4040 end
4141
@@ -46,20 +46,20 @@ defmodule SqlitexTest do
4646
4747 test "a basic query returns a list of keyword lists" , context do
4848 { :ok , [ row ] } = Sqlitex . query ( context [ :golf_db ] , "SELECT * FROM players ORDER BY id LIMIT 1" )
49- assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
49+ assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
5050 end
5151
5252 test "a basic query returns a list of maps when into: %{} is given" , context do
5353 { :ok , [ row ] } = Sqlitex . query ( context [ :golf_db ] , "SELECT * FROM players ORDER BY id LIMIT 1" , into: % { } )
54- assert row == % { id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil }
54+ assert row == % { id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil }
5555 end
5656
5757 test "with_db" do
5858 { :ok , [ row ] } = Sqlitex . with_db ( @ shared_cache , fn ( db ) ->
5959 Sqlitex . query ( db , "SELECT * FROM players ORDER BY id LIMIT 1" )
6060 end )
6161
62- assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
62+ assert row == [ id: 1 , name: "Mikey" , created_at: { { 2012 , 10 , 14 } , { 05 , 46 , 28 , 318_107 } } , updated_at: { { 2013 , 09 , 06 } , { 22 , 29 , 36 , 610_911 } } , type: nil ]
6363 end
6464
6565 test "table creation works as expected" do
0 commit comments