Skip to content

Commit

Permalink
Fix redundant code in test
Browse files Browse the repository at this point in the history
  • Loading branch information
tzmfreedom committed Mar 15, 2018
1 parent bfcfcc1 commit 7231af9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/parameter_coercer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@schema = JsonSchema.parse!(hyper_schema_data)
@schema.expand_references!
# POST /apps/:id
@link = @link = @schema.properties["app"].links[0]
@link = @schema.properties["app"].links[0]
end

it "pass datetime string" do
Expand Down
4 changes: 2 additions & 2 deletions test/request_validator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@schema = JsonSchema.parse!(hyper_schema_data)
@schema.expand_references!
# POST /apps/:id
@link = @link = @schema.properties["app"].links[0]
@link = @schema.properties["app"].links[0]
@request = Rack::Request.new({
"CONTENT_TYPE" => "application/json",
"rack.input" => StringIO.new("{}"),
Expand Down Expand Up @@ -65,7 +65,7 @@

it "detects an missing parameter in GET requests" do
# GET /apps/search?query=...
@link = @link = @schema.properties["app"].links[5]
@link = @schema.properties["app"].links[5]
@request = Rack::Request.new({})
e = assert_raises(Committee::InvalidRequest) do
call({})
Expand Down
2 changes: 1 addition & 1 deletion test/string_params_coercer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@schema = JsonSchema.parse!(hyper_schema_data)
@schema.expand_references!
# GET /search/apps
@link = @link = @schema.properties["app"].links[5]
@link = @schema.properties["app"].links[5]
end

it "doesn't coerce params not in the schema" do
Expand Down

0 comments on commit 7231af9

Please sign in to comment.