@@ -6,7 +6,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
66 alias Helper.Validator.Schema
77
88 describe "[basic schema]" do
9- @ tag :wip
109 test "string with options" do
1110 schema = % { "text" => [ :string , required: false ] }
1211 data = % { "no_exsit" => "text" }
@@ -48,7 +47,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
4847 # IO.inspect(Schema.cast(schema, data), label: "schema result")
4948 end
5049
51- @ tag :wip
5250 test "number with options" do
5351 schema = % { "text" => [ :number , required: false ] }
5452 data = % { "no_exsit" => 1 }
@@ -87,7 +85,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
8785 # hello world
8886 end
8987
90- @ tag :wip
9188 test "number with wrong option" do
9289 schema = % { "text" => [ :number , required: true , min: "5" ] }
9390 data = % { "text" => 1 }
@@ -102,7 +99,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
10299 assert error == [ % { field: "text" , message: "unknow option: no_exsit_option: xxx" , value: 1 } ]
103100 end
104101
105- @ tag :wip
106102 test "number with options edage case" do
107103 schema = % { "text" => [ :number , min: 2 ] }
108104 data = % { "text" => "aa" }
@@ -111,7 +107,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
111107 assert error == [ % { field: "text" , message: "should be: number" , value: "aa" } ]
112108 end
113109
114- @ tag :wip
115110 test "list with options" do
116111 schema = % { "text" => [ :list , required: false ] }
117112 data = % { "no_exsit" => [ ] }
@@ -127,7 +122,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
127122 assert { :ok , _ } = Schema . cast ( schema , data )
128123 end
129124
130- @ tag :wip
131125 test "boolean with options" do
132126 schema = % { "text" => [ :boolean , required: false ] }
133127 data = % { "no_exsit" => false }
@@ -143,7 +137,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
143137 assert { :ok , _ } = Schema . cast ( schema , data )
144138 end
145139
146- @ tag :wip
147140 test "enum with options" do
148141 schema = % { "text" => [ enum: [ 1 , 2 , 3 ] , required: false ] }
149142 data = % { "no_exsit" => false }
0 commit comments