spec/graph_ql/directive_spec.rb in graphql-0.2.0 vs spec/graph_ql/directive_spec.rb in graphql-0.3.0

- old
+ new

@@ -21,18 +21,18 @@ fragment dontIncludeIdField on Cheese { dontIncludeId: id @include(if: false) } fragment skipIdField on Cheese { skipId: id @skip(if: true) } fragment dontSkipIdField on Cheese { dontSkipId: id @skip(if: false) } |} it 'intercepts fields' do - expected = { "data" => {"directives" => { + expected = { "data" =>{ "cheese" => { "dontSkipFlavor" => "Brie", "includeFlavor" => "Brie", "includeId" => 1, "dontSkipId" => 1, }, - }}} + }} assert_equal(expected, result) end end describe 'on fragments' do let(:query_string) { %|query directives { @@ -63,19 +63,19 @@ fragment skipIdField on Cheese @skip(if: true) { skipId: id } fragment dontSkipIdField on Cheese @skip(if: false) { dontSkipId: id } |} it 'intercepts fragment spreads' do - expected = { "data" => {"directives" => { + expected = { "data" => { "cheese" => { "dontSkipFlavor" => "Brie", "includeFlavor" => "Brie", "includeId" => 1, "dontSkipId" => 1, "dontSkipInlineId" => 1, "includeInlineId" => 1, }, - }}} + }} assert_equal(expected, result) end end end