@@ -17,7 +17,7 @@ defmodule AshRandomParamsTest do
1717 attribute :opt_str , :string , allow_nil?: true , public?: true
1818
1919 attribute :req_int , :integer , allow_nil?: false , public?: true
20- attribute :opt_int , :integer , allow_nil?: true , public?: true
20+ attribute :opt_int , :integer , allow_nil?: false , public?: true , default: 123
2121 end
2222
2323 actions do
@@ -82,7 +82,7 @@ defmodule AshRandomParamsTest do
8282 req_str: "req_str-" <> _ ,
8383 opt_str: nil ,
8484 req_int: 777 ,
85- opt_int: nil
85+ opt_int: 123
8686 } =
8787 params =
8888 Post
@@ -104,7 +104,7 @@ defmodule AshRandomParamsTest do
104104 req_str: "req_str-" <> _ ,
105105 opt_str: nil ,
106106 req_int: 123_456 ,
107- opt_int: nil
107+ opt_int: 123
108108 } =
109109 Post
110110 |> Ash.ActionInput . for_action (
@@ -125,7 +125,7 @@ defmodule AshRandomParamsTest do
125125 req_str: "req_str-" <> _ ,
126126 opt_str: "opt_str-" <> _ ,
127127 req_int: 777 ,
128- opt_int: nil
128+ opt_int: 123
129129 } =
130130 Post
131131 |> Ash.ActionInput . for_action (
@@ -143,7 +143,7 @@ defmodule AshRandomParamsTest do
143143 author_id: nil ,
144144 opt_str: nil ,
145145 req_int: 777 ,
146- opt_int: nil
146+ opt_int: 123
147147 } =
148148 params =
149149 Post
@@ -187,7 +187,7 @@ defmodule AshRandomParamsTest do
187187 req_str: "req_str-" <> _ ,
188188 opt_str: nil ,
189189 req_int: 777 ,
190- opt_int: nil
190+ opt_int: 123
191191 } =
192192 Post . random_params! ( :create )
193193
0 commit comments