@@ -6,7 +6,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
6
6
alias Helper.Validator.Schema
7
7
8
8
describe "[basic schema]" do
9
- @ tag :wip
10
9
test "string with options" do
11
10
schema = % { "text" => [ :string , required: false ] }
12
11
data = % { "no_exsit" => "text" }
@@ -48,7 +47,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
48
47
# IO.inspect(Schema.cast(schema, data), label: "schema result")
49
48
end
50
49
51
- @ tag :wip
52
50
test "number with options" do
53
51
schema = % { "text" => [ :number , required: false ] }
54
52
data = % { "no_exsit" => 1 }
@@ -87,7 +85,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
87
85
# hello world
88
86
end
89
87
90
- @ tag :wip
91
88
test "number with wrong option" do
92
89
schema = % { "text" => [ :number , required: true , min: "5" ] }
93
90
data = % { "text" => 1 }
@@ -102,7 +99,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
102
99
assert error == [ % { field: "text" , message: "unknow option: no_exsit_option: xxx" , value: 1 } ]
103
100
end
104
101
105
- @ tag :wip
106
102
test "number with options edage case" do
107
103
schema = % { "text" => [ :number , min: 2 ] }
108
104
data = % { "text" => "aa" }
@@ -111,7 +107,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
111
107
assert error == [ % { field: "text" , message: "should be: number" , value: "aa" } ]
112
108
end
113
109
114
- @ tag :wip
115
110
test "list with options" do
116
111
schema = % { "text" => [ :list , required: false ] }
117
112
data = % { "no_exsit" => [ ] }
@@ -127,7 +122,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
127
122
assert { :ok , _ } = Schema . cast ( schema , data )
128
123
end
129
124
130
- @ tag :wip
131
125
test "boolean with options" do
132
126
schema = % { "text" => [ :boolean , required: false ] }
133
127
data = % { "no_exsit" => false }
@@ -143,7 +137,6 @@ defmodule GroupherServer.Test.Helper.Validator.Schema do
143
137
assert { :ok , _ } = Schema . cast ( schema , data )
144
138
end
145
139
146
- @ tag :wip
147
140
test "enum with options" do
148
141
schema = % { "text" => [ enum: [ 1 , 2 , 3 ] , required: false ] }
149
142
data = % { "no_exsit" => false }