coverage/index.html in gqli-0.5.0 vs coverage/index.html in gqli-0.6.0
- old
+ new
@@ -12,31 +12,31 @@
<body>
<div id="loading">
<img src="./assets/0.10.2/loading.gif" alt="loading"/>
</div>
<div id="wrapper" style="display:none;">
- <div class="timestamp">Generated <abbr class="timeago" title="2019-01-25T13:46:22+01:00">2019-01-25T13:46:22+01:00</abbr></div>
+ <div class="timestamp">Generated <abbr class="timeago" title="2019-02-18T10:26:59-08:00">2019-02-18T10:26:59-08:00</abbr></div>
<ul class="group_tabs"></ul>
<div id="content">
<div class="file_list_container" id="AllFiles">
<h2>
<span class="group_name">All Files</span>
- (<span class="covered_percent"><span class="green">97.95%</span></span>
+ (<span class="covered_percent"><span class="green">97.94%</span></span>
covered at
<span class="covered_strength">
<span class="green">
- 40.0
+ 40.76
</span>
</span> hits/line)
</h2>
<a name="AllFiles"></a>
<div>
- <b>13</b> files in total.
- <b>536</b> relevant lines.
- <span class="green"><b>525</b> lines covered</span> and
- <span class="red"><b>11</b> lines missed </span>
+ <b>17</b> files in total.
+ <b>583</b> relevant lines.
+ <span class="green"><b>571</b> lines covered</span> and
+ <span class="red"><b>12</b> lines missed </span>
</div>
<table class="file_list">
<thead>
<tr>
<th>File</th>
@@ -51,13 +51,13 @@
<tbody>
<tr>
<td class="strong"><a href="#c4c0ccce18d53f019a15391e06762c3a041e5bae" class="src_link" title="lib/gqli.rb">lib/gqli.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>6</td>
- <td>4</td>
- <td>4</td>
+ <td>7</td>
+ <td>5</td>
+ <td>5</td>
<td>0</td>
<td>1.0</td>
</tr>
<tr>
@@ -65,34 +65,64 @@
<td class="green strong">100.0 %</td>
<td>64</td>
<td>31</td>
<td>31</td>
<td>0</td>
- <td>99.6</td>
+ <td>104.3</td>
</tr>
<tr>
<td class="strong"><a href="#68dcd39c86205e255ffb6dcb92fa9f24c6f7d923" class="src_link" title="lib/gqli/client.rb">lib/gqli/client.rb</a></td>
<td class="green strong">93.75 %</td>
<td>71</td>
<td>32</td>
<td>30</td>
<td>2</td>
- <td>8.6</td>
+ <td>9.4</td>
</tr>
<tr>
- <td class="strong"><a href="#9abd05ccff4ad7a4f5b1bb75901af6e008bc9c5d" class="src_link" title="lib/gqli/dsl.rb">lib/gqli/dsl.rb</a></td>
+ <td class="strong"><a href="#256fff82f19c25133275deedd45d6d640936f554" class="src_link" title="lib/gqli/clients.rb">lib/gqli/clients.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>52</td>
+ <td>4</td>
+ <td>2</td>
+ <td>2</td>
+ <td>0</td>
+ <td>1.0</td>
+ </tr>
+
+ <tr>
+ <td class="strong"><a href="#e83d3bec7315674f38be5512929d6dd6e4da3350" class="src_link" title="lib/gqli/clients/contentful.rb">lib/gqli/clients/contentful.rb</a></td>
+ <td class="green strong">100.0 %</td>
+ <td>20</td>
+ <td>6</td>
+ <td>6</td>
+ <td>0</td>
+ <td>13.5</td>
+ </tr>
+
+ <tr>
+ <td class="strong"><a href="#9ae797b62f9c9d7c3dc6100c985c29378d1a6c73" class="src_link" title="lib/gqli/clients/github.rb">lib/gqli/clients/github.rb</a></td>
+ <td class="green strong">100.0 %</td>
<td>17</td>
- <td>17</td>
+ <td>4</td>
+ <td>4</td>
<td>0</td>
- <td>3.2</td>
+ <td>1.0</td>
</tr>
<tr>
+ <td class="strong"><a href="#9abd05ccff4ad7a4f5b1bb75901af6e008bc9c5d" class="src_link" title="lib/gqli/dsl.rb">lib/gqli/dsl.rb</a></td>
+ <td class="green strong">100.0 %</td>
+ <td>67</td>
+ <td>22</td>
+ <td>22</td>
+ <td>0</td>
+ <td>2.9</td>
+ </tr>
+
+ <tr>
<td class="strong"><a href="#8599aaf43ba4686fbd793a6b54bdf898bbb28978" class="src_link" title="lib/gqli/enum_value.rb">lib/gqli/enum_value.rb</a></td>
<td class="green strong">100.0 %</td>
<td>17</td>
<td>7</td>
<td>7</td>
@@ -115,69 +145,79 @@
<td class="green strong">100.0 %</td>
<td>99</td>
<td>65</td>
<td>65</td>
<td>0</td>
- <td>3.4</td>
+ <td>3.5</td>
</tr>
<tr>
<td class="strong"><a href="#827311add0f30734381233709eff6f2feef29107" class="src_link" title="lib/gqli/node.rb">lib/gqli/node.rb</a></td>
<td class="green strong">100.0 %</td>
<td>61</td>
<td>31</td>
<td>31</td>
<td>0</td>
- <td>432.4</td>
+ <td>473.6</td>
</tr>
<tr>
<td class="strong"><a href="#add3b96d53406d04d830c517b925e60e5592500d" class="src_link" title="lib/gqli/query.rb">lib/gqli/query.rb</a></td>
<td class="green strong">100.0 %</td>
<td>29</td>
<td>10</td>
<td>10</td>
<td>0</td>
- <td>8.8</td>
+ <td>9.4</td>
</tr>
<tr>
<td class="strong"><a href="#fc631e4d066aa11a78ad288ef5341c2bc5e2fd9d" class="src_link" title="lib/gqli/response.rb">lib/gqli/response.rb</a></td>
<td class="green strong">100.0 %</td>
<td>15</td>
<td>7</td>
<td>7</td>
<td>0</td>
- <td>7.6</td>
+ <td>8.1</td>
</tr>
<tr>
+ <td class="strong"><a href="#3b534dd15131bb6d8770662787bf8f8099b5cf25" class="src_link" title="lib/gqli/subscription.rb">lib/gqli/subscription.rb</a></td>
+ <td class="yellow strong">88.89 %</td>
+ <td>27</td>
+ <td>9</td>
+ <td>8</td>
+ <td>1</td>
+ <td>2.6</td>
+ </tr>
+
+ <tr>
<td class="strong"><a href="#4c31f7a77052c02790c8c5c06fd2085c7022ac23" class="src_link" title="lib/gqli/validation.rb">lib/gqli/validation.rb</a></td>
- <td class="green strong">91.18 %</td>
- <td>192</td>
- <td>102</td>
- <td>93</td>
+ <td class="green strong">91.51 %</td>
+ <td>200</td>
+ <td>106</td>
+ <td>97</td>
<td>9</td>
- <td>37.9</td>
+ <td>43.1</td>
</tr>
<tr>
<td class="strong"><a href="#05ca502e27573f65843239369098f0fc2c85f3d3" class="src_link" title="spec/lib/gqli/client_spec.rb">spec/lib/gqli/client_spec.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>113</td>
- <td>46</td>
- <td>46</td>
+ <td>121</td>
+ <td>50</td>
+ <td>50</td>
<td>0</td>
- <td>1.6</td>
+ <td>1.7</td>
</tr>
<tr>
<td class="strong"><a href="#a6d1c1911a021a8ab76d6b8afd1ba662a68cd017" class="src_link" title="spec/lib/gqli/introspection_spec.rb">spec/lib/gqli/introspection_spec.rb</a></td>
<td class="green strong">100.0 %</td>
- <td>304</td>
- <td>174</td>
- <td>174</td>
+ <td>326</td>
+ <td>186</td>
+ <td>186</td>
<td>0</td>
<td>1.6</td>
</tr>
</tbody>
@@ -199,12 +239,12 @@
<div class="source_table" id="c4c0ccce18d53f019a15391e06762c3a041e5bae">
<div class="header">
<h3>lib/gqli.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>4</b> relevant lines.
- <span class="green"><b>4</b> lines covered</span> and
+ <b>5</b> relevant lines.
+ <span class="green"><b>5</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -244,10 +284,16 @@
<span class="hits">1</span>
<code class="ruby">require_relative './gqli/version'</code>
</li>
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
+
+ <code class="ruby">require_relative './gqli/clients'</code>
+ </li>
+
</ol>
</pre>
</div>
@@ -323,30 +369,30 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(name = nil, depth = 0, &block)</code>
</li>
- <li class="covered" data-hits="358" data-linenumber="11">
- <span class="hits">358</span>
+ <li class="covered" data-hits="380" data-linenumber="11">
+ <span class="hits">380</span>
<code class="ruby"> @__name = name</code>
</li>
- <li class="covered" data-hits="358" data-linenumber="12">
- <span class="hits">358</span>
+ <li class="covered" data-hits="380" data-linenumber="12">
+ <span class="hits">380</span>
<code class="ruby"> @__depth = depth</code>
</li>
- <li class="covered" data-hits="358" data-linenumber="13">
- <span class="hits">358</span>
+ <li class="covered" data-hits="380" data-linenumber="13">
+ <span class="hits">380</span>
<code class="ruby"> @__nodes = []</code>
</li>
- <li class="covered" data-hits="358" data-linenumber="14">
- <span class="hits">358</span>
+ <li class="covered" data-hits="380" data-linenumber="14">
+ <span class="hits">380</span>
<code class="ruby"> instance_eval(&block) unless block.nil?</code>
</li>
<li class="never" data-hits="" data-linenumber="15">
@@ -431,18 +477,18 @@
<span class="hits">1</span>
<code class="ruby"> def __node(name, params = {}, &block)</code>
</li>
- <li class="covered" data-hits="144" data-linenumber="29">
- <span class="hits">144</span>
+ <li class="covered" data-hits="160" data-linenumber="29">
+ <span class="hits">160</span>
<code class="ruby"> require_relative './node'</code>
</li>
- <li class="covered" data-hits="144" data-linenumber="30">
- <span class="hits">144</span>
+ <li class="covered" data-hits="160" data-linenumber="30">
+ <span class="hits">160</span>
<code class="ruby"> @__nodes << Node.new(name, params, __depth + 1, &block)</code>
</li>
<li class="never" data-hits="" data-linenumber="31">
@@ -599,12 +645,12 @@
<span class="hits">1</span>
<code class="ruby"> def __params_from_args(args)</code>
</li>
- <li class="covered" data-hits="139" data-linenumber="57">
- <span class="hits">139</span>
+ <li class="covered" data-hits="151" data-linenumber="57">
+ <span class="hits">151</span>
<code class="ruby"> args.empty? ? {} : args[0]</code>
</li>
<li class="never" data-hits="" data-linenumber="58">
@@ -623,12 +669,12 @@
<span class="hits">1</span>
<code class="ruby"> def method_missing(name, *args, &block)</code>
</li>
- <li class="covered" data-hits="139" data-linenumber="61">
- <span class="hits">139</span>
+ <li class="covered" data-hits="151" data-linenumber="61">
+ <span class="hits">151</span>
<code class="ruby"> __node(name.to_s, __params_from_args(args), &block)</code>
</li>
<li class="never" data-hits="" data-linenumber="62">
@@ -750,42 +796,42 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(url, params: {}, headers: {}, validate_query: true)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="15">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="15">
+ <span class="hits">27</span>
<code class="ruby"> @url = url</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="16">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="16">
+ <span class="hits">27</span>
<code class="ruby"> @params = params</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="17">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="17">
+ <span class="hits">27</span>
<code class="ruby"> @headers = headers</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="18">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="18">
+ <span class="hits">27</span>
<code class="ruby"> @validate_query = validate_query</code>
</li>
<li class="never" data-hits="" data-linenumber="19">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="24" data-linenumber="20">
- <span class="hits">24</span>
+ <li class="covered" data-hits="27" data-linenumber="20">
+ <span class="hits">27</span>
<code class="ruby"> @schema = Introspection.new(self) if validate_query</code>
</li>
<li class="never" data-hits="" data-linenumber="21">
@@ -882,48 +928,48 @@
<span class="hits">1</span>
<code class="ruby"> def execute!(query)</code>
</li>
- <li class="covered" data-hits="26" data-linenumber="37">
- <span class="hits">26</span>
+ <li class="covered" data-hits="28" data-linenumber="37">
+ <span class="hits">28</span>
<code class="ruby"> http_response = HTTP.headers(request_headers).post(@url, params: @params, json: { query: query.to_gql })</code>
</li>
<li class="never" data-hits="" data-linenumber="38">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="26" data-linenumber="39">
- <span class="hits">26</span>
+ <li class="covered" data-hits="28" data-linenumber="39">
+ <span class="hits">28</span>
<code class="ruby"> fail "Error: #{http_response.reason}\nBody: #{http_response.body}" if http_response.status >= 300</code>
</li>
<li class="never" data-hits="" data-linenumber="40">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="24" data-linenumber="41">
- <span class="hits">24</span>
+ <li class="covered" data-hits="26" data-linenumber="41">
+ <span class="hits">26</span>
<code class="ruby"> data = JSON.parse(http_response.to_s)['data']</code>
</li>
<li class="never" data-hits="" data-linenumber="42">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="24" data-linenumber="43">
- <span class="hits">24</span>
+ <li class="covered" data-hits="26" data-linenumber="43">
+ <span class="hits">26</span>
<code class="ruby"> Response.new(data, query)</code>
</li>
<li class="never" data-hits="" data-linenumber="44">
@@ -1068,12 +1114,12 @@
<code class="ruby"> user_agent: "gqli.rb/#{VERSION}; http.rb/#{HTTP::VERSION}"</code>
</li>
- <li class="covered" data-hits="26" data-linenumber="68">
- <span class="hits">26</span>
+ <li class="covered" data-hits="28" data-linenumber="68">
+ <span class="hits">28</span>
<code class="ruby"> }.merge(@headers)</code>
</li>
<li class="never" data-hits="" data-linenumber="69">
@@ -1097,17 +1143,320 @@
</ol>
</pre>
</div>
+ <div class="source_table" id="256fff82f19c25133275deedd45d6d640936f554">
+ <div class="header">
+ <h3>lib/gqli/clients.rb</h3>
+ <h4><span class="green">100.0 %</span> covered</h4>
+ <div>
+ <b>2</b> relevant lines.
+ <span class="green"><b>2</b> lines covered</span> and
+ <span class="red"><b>0</b> lines missed.</span>
+ </div>
+ </div>
+
+ <pre>
+ <ol>
+
+ <li class="never" data-hits="" data-linenumber="1">
+
+
+ <code class="ruby"># frozen_string_literal: true</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="2">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="3">
+ <span class="hits">1</span>
+
+ <code class="ruby">require_relative './clients/contentful'</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="4">
+ <span class="hits">1</span>
+
+ <code class="ruby">require_relative './clients/github'</code>
+ </li>
+
+ </ol>
+ </pre>
+</div>
+
+
+ <div class="source_table" id="e83d3bec7315674f38be5512929d6dd6e4da3350">
+ <div class="header">
+ <h3>lib/gqli/clients/contentful.rb</h3>
+ <h4><span class="green">100.0 %</span> covered</h4>
+ <div>
+ <b>6</b> relevant lines.
+ <span class="green"><b>6</b> lines covered</span> and
+ <span class="red"><b>0</b> lines missed.</span>
+ </div>
+ </div>
+
+ <pre>
+ <ol>
+
+ <li class="never" data-hits="" data-linenumber="1">
+
+
+ <code class="ruby"># frozen_string_literal: true</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="2">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="3">
+ <span class="hits">1</span>
+
+ <code class="ruby">module GQLi</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="4">
+
+
+ <code class="ruby"> # Module for creating a Contentful GraphQL client</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="5">
+ <span class="hits">1</span>
+
+ <code class="ruby"> module Contentful</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="6">
+
+
+ <code class="ruby"> # Creates a Contentful GraphQL client</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def self.create(space, access_token, environment: nil, validate_query: true)</code>
+ </li>
+
+ <li class="covered" data-hits="26" data-linenumber="8">
+ <span class="hits">26</span>
+
+ <code class="ruby"> api_url = "https://graphql.contentful.com/content/v1/spaces/#{space}"</code>
+ </li>
+
+ <li class="covered" data-hits="26" data-linenumber="9">
+ <span class="hits">26</span>
+
+ <code class="ruby"> api_url += "/environments/#{environment}" unless environment.nil?</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="10">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="26" data-linenumber="11">
+ <span class="hits">26</span>
+
+ <code class="ruby"> GQLi::Client.new(</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="12">
+
+
+ <code class="ruby"> api_url,</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="13">
+
+
+ <code class="ruby"> headers: {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="14">
+
+
+ <code class="ruby"> 'Authorization' => "Bearer #{access_token}"</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="15">
+
+
+ <code class="ruby"> },</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="16">
+
+
+ <code class="ruby"> validate_query: validate_query</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="17">
+
+
+ <code class="ruby"> )</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="18">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="19">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="20">
+
+
+ <code class="ruby">end</code>
+ </li>
+
+ </ol>
+ </pre>
+</div>
+
+
+ <div class="source_table" id="9ae797b62f9c9d7c3dc6100c985c29378d1a6c73">
+ <div class="header">
+ <h3>lib/gqli/clients/github.rb</h3>
+ <h4><span class="green">100.0 %</span> covered</h4>
+ <div>
+ <b>4</b> relevant lines.
+ <span class="green"><b>4</b> lines covered</span> and
+ <span class="red"><b>0</b> lines missed.</span>
+ </div>
+ </div>
+
+ <pre>
+ <ol>
+
+ <li class="never" data-hits="" data-linenumber="1">
+
+
+ <code class="ruby"># frozen_string_literal: true</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="2">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="3">
+ <span class="hits">1</span>
+
+ <code class="ruby">module GQLi</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="4">
+
+
+ <code class="ruby"> # Module for creating a Github GraphQL client</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="5">
+ <span class="hits">1</span>
+
+ <code class="ruby"> module Github</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="6">
+
+
+ <code class="ruby"> # Creates a Github GraphQL client</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def self.create(access_token, validate_query: true)</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="8">
+ <span class="hits">1</span>
+
+ <code class="ruby"> GQLi::Client.new(</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="9">
+
+
+ <code class="ruby"> 'https://api.github.com/graphql',</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="10">
+
+
+ <code class="ruby"> headers: {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="11">
+
+
+ <code class="ruby"> 'Authorization' => "Bearer #{access_token}"</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="12">
+
+
+ <code class="ruby"> },</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="13">
+
+
+ <code class="ruby"> validate_query: validate_query</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="14">
+
+
+ <code class="ruby"> )</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="15">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="16">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="17">
+
+
+ <code class="ruby">end</code>
+ </li>
+
+ </ol>
+ </pre>
+</div>
+
+
<div class="source_table" id="9abd05ccff4ad7a4f5b1bb75901af6e008bc9c5d">
<div class="header">
<h3>lib/gqli/dsl.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>17</b> relevant lines.
- <span class="green"><b>17</b> lines covered</span> and
+ <b>22</b> relevant lines.
+ <span class="green"><b>22</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -1132,296 +1481,386 @@
</li>
<li class="covered" data-hits="1" data-linenumber="4">
<span class="hits">1</span>
- <code class="ruby">require_relative './fragment'</code>
+ <code class="ruby">require_relative './subscription'</code>
</li>
<li class="covered" data-hits="1" data-linenumber="5">
<span class="hits">1</span>
+ <code class="ruby">require_relative './fragment'</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="6">
+ <span class="hits">1</span>
+
<code class="ruby">require_relative './enum_value'</code>
</li>
- <li class="never" data-hits="" data-linenumber="6">
+ <li class="never" data-hits="" data-linenumber="7">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="7">
+ <li class="covered" data-hits="1" data-linenumber="8">
<span class="hits">1</span>
<code class="ruby">module GQLi</code>
</li>
- <li class="never" data-hits="" data-linenumber="8">
+ <li class="never" data-hits="" data-linenumber="9">
<code class="ruby"> # GraphQL-like DSL methods</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="9">
+ <li class="covered" data-hits="1" data-linenumber="10">
<span class="hits">1</span>
<code class="ruby"> module DSL</code>
</li>
- <li class="never" data-hits="" data-linenumber="10">
+ <li class="never" data-hits="" data-linenumber="11">
<code class="ruby"> # Creates a Query object</code>
</li>
- <li class="never" data-hits="" data-linenumber="11">
+ <li class="never" data-hits="" data-linenumber="12">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="12">
+ <li class="never" data-hits="" data-linenumber="13">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="13">
+ <li class="covered" data-hits="1" data-linenumber="14">
<span class="hits">1</span>
<code class="ruby"> def self.query(name = nil, &block)</code>
</li>
- <li class="covered" data-hits="32" data-linenumber="14">
- <span class="hits">32</span>
+ <li class="covered" data-hits="34" data-linenumber="15">
+ <span class="hits">34</span>
<code class="ruby"> Query.new(name, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="15">
+ <li class="never" data-hits="" data-linenumber="16">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="16">
+ <li class="never" data-hits="" data-linenumber="17">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="17">
+ <li class="never" data-hits="" data-linenumber="18">
+ <code class="ruby"> # Creates a Subscription object</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="19">
+
+
+ <code class="ruby"> #</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="20">
+
+
+ <code class="ruby"> # Can be used at a class level</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="21">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def self.subscription(name = nil, &block)</code>
+ </li>
+
+ <li class="covered" data-hits="2" data-linenumber="22">
+ <span class="hits">2</span>
+
+ <code class="ruby"> Subscription.new(name, &block)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="23">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="24">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="25">
+
+
<code class="ruby"> # Creates a Fragment object</code>
</li>
- <li class="never" data-hits="" data-linenumber="18">
+ <li class="never" data-hits="" data-linenumber="26">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="19">
+ <li class="never" data-hits="" data-linenumber="27">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="20">
+ <li class="covered" data-hits="1" data-linenumber="28">
<span class="hits">1</span>
<code class="ruby"> def self.fragment(name, on, &block)</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="21">
+ <li class="covered" data-hits="3" data-linenumber="29">
<span class="hits">3</span>
<code class="ruby"> Fragment.new(name, on, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="22">
+ <li class="never" data-hits="" data-linenumber="30">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="23">
+ <li class="never" data-hits="" data-linenumber="31">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="24">
+ <li class="never" data-hits="" data-linenumber="32">
<code class="ruby"> # Creates a EnumValue object</code>
</li>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="never" data-hits="" data-linenumber="33">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="26">
+ <li class="never" data-hits="" data-linenumber="34">
<code class="ruby"> # Can be used at a class level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="27">
+ <li class="covered" data-hits="1" data-linenumber="35">
<span class="hits">1</span>
<code class="ruby"> def self.enum(value)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="28">
+ <li class="covered" data-hits="1" data-linenumber="36">
<span class="hits">1</span>
<code class="ruby"> EnumValue.new(value)</code>
</li>
- <li class="never" data-hits="" data-linenumber="29">
+ <li class="never" data-hits="" data-linenumber="37">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="30">
+ <li class="never" data-hits="" data-linenumber="38">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="31">
+ <li class="never" data-hits="" data-linenumber="39">
<code class="ruby"> # Creates a Query object</code>
</li>
- <li class="never" data-hits="" data-linenumber="32">
+ <li class="never" data-hits="" data-linenumber="40">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="33">
+ <li class="never" data-hits="" data-linenumber="41">
<code class="ruby"> # Can be used at an instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="34">
+ <li class="covered" data-hits="1" data-linenumber="42">
<span class="hits">1</span>
<code class="ruby"> def query(name = nil, &block)</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="35">
+ <li class="covered" data-hits="3" data-linenumber="43">
<span class="hits">3</span>
<code class="ruby"> Query.new(name, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="36">
+ <li class="never" data-hits="" data-linenumber="44">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="37">
+ <li class="never" data-hits="" data-linenumber="45">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="38">
+ <li class="never" data-hits="" data-linenumber="46">
+ <code class="ruby"> # Creates a Subscription object</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="47">
+
+
+ <code class="ruby"> #</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="48">
+
+
+ <code class="ruby"> # Can be used at a class level</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="49">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def subscription(name = nil, &block)</code>
+ </li>
+
+ <li class="covered" data-hits="2" data-linenumber="50">
+ <span class="hits">2</span>
+
+ <code class="ruby"> Subscription.new(name, &block)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="51">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="52">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="53">
+
+
<code class="ruby"> # Creates a Fragment object</code>
</li>
- <li class="never" data-hits="" data-linenumber="39">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="40">
+ <li class="never" data-hits="" data-linenumber="55">
<code class="ruby"> # Can be used at an instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="41">
+ <li class="covered" data-hits="1" data-linenumber="56">
<span class="hits">1</span>
<code class="ruby"> def fragment(name, on, &block)</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="42">
+ <li class="covered" data-hits="4" data-linenumber="57">
<span class="hits">4</span>
<code class="ruby"> Fragment.new(name, on, &block)</code>
</li>
- <li class="never" data-hits="" data-linenumber="43">
+ <li class="never" data-hits="" data-linenumber="58">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="59">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="60">
<code class="ruby"> # Creates a EnumValue object</code>
</li>
- <li class="never" data-hits="" data-linenumber="46">
+ <li class="never" data-hits="" data-linenumber="61">
<code class="ruby"> #</code>
</li>
- <li class="never" data-hits="" data-linenumber="47">
+ <li class="never" data-hits="" data-linenumber="62">
<code class="ruby"> # Can be used at an instance level</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="48">
+ <li class="covered" data-hits="1" data-linenumber="63">
<span class="hits">1</span>
<code class="ruby"> def enum(value)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="49">
+ <li class="covered" data-hits="1" data-linenumber="64">
<span class="hits">1</span>
<code class="ruby"> EnumValue.new(value)</code>
</li>
- <li class="never" data-hits="" data-linenumber="50">
+ <li class="never" data-hits="" data-linenumber="65">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="66">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="52">
+ <li class="never" data-hits="" data-linenumber="67">
<code class="ruby">end</code>
</li>
@@ -2218,36 +2657,36 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(client)</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="82">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="82">
+ <span class="hits">24</span>
<code class="ruby"> @schema = client.execute!(IntrospectionQuery).data.__schema</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="83">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="83">
+ <span class="hits">24</span>
<code class="ruby"> @query_type = schema.queryType</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="84">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="84">
+ <span class="hits">24</span>
<code class="ruby"> @mutation_type = schema.mutationType</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="85">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="85">
+ <span class="hits">24</span>
<code class="ruby"> @subscription_type = schema.subscriptionType</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="86">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="86">
+ <span class="hits">24</span>
<code class="ruby"> @types = schema.types</code>
</li>
<li class="never" data-hits="" data-linenumber="87">
@@ -2272,12 +2711,12 @@
<span class="hits">1</span>
<code class="ruby"> def validate(query)</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="91">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="91">
+ <span class="hits">31</span>
<code class="ruby"> Validation.new(self, query)</code>
</li>
<li class="never" data-hits="" data-linenumber="92">
@@ -2405,18 +2844,18 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(name, params = {}, depth = 1, &block)</code>
</li>
- <li class="covered" data-hits="316" data-linenumber="11">
- <span class="hits">316</span>
+ <li class="covered" data-hits="332" data-linenumber="11">
+ <span class="hits">332</span>
<code class="ruby"> super(name, depth, &block)</code>
</li>
- <li class="covered" data-hits="316" data-linenumber="12">
- <span class="hits">316</span>
+ <li class="covered" data-hits="332" data-linenumber="12">
+ <span class="hits">332</span>
<code class="ruby"> @__params = params</code>
</li>
<li class="never" data-hits="" data-linenumber="13">
@@ -2441,42 +2880,42 @@
<span class="hits">1</span>
<code class="ruby"> def to_gql</code>
</li>
- <li class="covered" data-hits="2489" data-linenumber="17">
- <span class="hits">2489</span>
+ <li class="covered" data-hits="2725" data-linenumber="17">
+ <span class="hits">2725</span>
<code class="ruby"> result = ' ' * __depth + __name</code>
</li>
- <li class="covered" data-hits="2489" data-linenumber="18">
- <span class="hits">2489</span>
+ <li class="covered" data-hits="2725" data-linenumber="18">
+ <span class="hits">2725</span>
<code class="ruby"> result += __params_to_s(__params, true) unless __params.empty?</code>
</li>
- <li class="covered" data-hits="2489" data-linenumber="19">
- <span class="hits">2489</span>
+ <li class="covered" data-hits="2725" data-linenumber="19">
+ <span class="hits">2725</span>
<code class="ruby"> unless __nodes.empty?</code>
</li>
- <li class="covered" data-hits="789" data-linenumber="20">
- <span class="hits">789</span>
+ <li class="covered" data-hits="863" data-linenumber="20">
+ <span class="hits">863</span>
<code class="ruby"> result += " {\n"</code>
</li>
- <li class="covered" data-hits="789" data-linenumber="21">
- <span class="hits">789</span>
+ <li class="covered" data-hits="863" data-linenumber="21">
+ <span class="hits">863</span>
<code class="ruby"> result += __nodes.map(&:to_gql).join("\n")</code>
</li>
- <li class="covered" data-hits="789" data-linenumber="22">
- <span class="hits">789</span>
+ <li class="covered" data-hits="863" data-linenumber="22">
+ <span class="hits">863</span>
<code class="ruby"> result += "\n#{' ' * __depth}}"</code>
</li>
<li class="never" data-hits="" data-linenumber="23">
@@ -2489,12 +2928,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="2489" data-linenumber="25">
- <span class="hits">2489</span>
+ <li class="covered" data-hits="2725" data-linenumber="25">
+ <span class="hits">2725</span>
<code class="ruby"> result</code>
</li>
<li class="never" data-hits="" data-linenumber="26">
@@ -2525,12 +2964,12 @@
<span class="hits">1</span>
<code class="ruby"> def __directive?(params)</code>
</li>
- <li class="covered" data-hits="55" data-linenumber="31">
- <span class="hits">55</span>
+ <li class="covered" data-hits="65" data-linenumber="31">
+ <span class="hits">65</span>
<code class="ruby"> params.size == 1 && params.keys.first.to_s.start_with?('@')</code>
</li>
<li class="never" data-hits="" data-linenumber="32">
@@ -2585,42 +3024,42 @@
<span class="hits">1</span>
<code class="ruby"> def __params_to_s(params, initial = false)</code>
</li>
- <li class="covered" data-hits="109" data-linenumber="41">
- <span class="hits">109</span>
+ <li class="covered" data-hits="126" data-linenumber="41">
+ <span class="hits">126</span>
<code class="ruby"> case params</code>
</li>
<li class="never" data-hits="" data-linenumber="42">
<code class="ruby"> when ::Hash</code>
</li>
- <li class="covered" data-hits="55" data-linenumber="43">
- <span class="hits">55</span>
+ <li class="covered" data-hits="65" data-linenumber="43">
+ <span class="hits">65</span>
<code class="ruby"> return __directive(params) if __directive?(params)</code>
</li>
<li class="never" data-hits="" data-linenumber="44">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="53" data-linenumber="45">
- <span class="hits">53</span>
+ <li class="covered" data-hits="63" data-linenumber="45">
+ <span class="hits">63</span>
<code class="ruby"> result = params.map do |k, v|</code>
</li>
- <li class="covered" data-hits="53" data-linenumber="46">
- <span class="hits">53</span>
+ <li class="covered" data-hits="64" data-linenumber="46">
+ <span class="hits">64</span>
<code class="ruby"> "#{k}: #{__params_to_s(v)}"</code>
</li>
<li class="never" data-hits="" data-linenumber="47">
@@ -2633,24 +3072,24 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="53" data-linenumber="49">
- <span class="hits">53</span>
+ <li class="covered" data-hits="63" data-linenumber="49">
+ <span class="hits">63</span>
<code class="ruby"> return "(#{result})" if initial</code>
</li>
<li class="never" data-hits="" data-linenumber="50">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="51">
- <span class="hits">1</span>
+ <li class="covered" data-hits="5" data-linenumber="51">
+ <span class="hits">5</span>
<code class="ruby"> "{#{result}}"</code>
</li>
<li class="never" data-hits="" data-linenumber="52">
@@ -2669,24 +3108,24 @@
<code class="ruby"> when ::String</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="55">
- <span class="hits">2</span>
+ <li class="covered" data-hits="4" data-linenumber="55">
+ <span class="hits">4</span>
<code class="ruby"> "\"#{params}\""</code>
</li>
<li class="never" data-hits="" data-linenumber="56">
<code class="ruby"> else</code>
</li>
- <li class="covered" data-hits="51" data-linenumber="57">
- <span class="hits">51</span>
+ <li class="covered" data-hits="56" data-linenumber="57">
+ <span class="hits">56</span>
<code class="ruby"> params.to_s</code>
</li>
<li class="never" data-hits="" data-linenumber="58">
@@ -2784,12 +3223,12 @@
<span class="hits">1</span>
<code class="ruby"> def to_gql</code>
</li>
- <li class="covered" data-hits="40" data-linenumber="10">
- <span class="hits">40</span>
+ <li class="covered" data-hits="43" data-linenumber="10">
+ <span class="hits">43</span>
<code class="ruby"> result = <<~GQL</code>
</li>
<li class="never" data-hits="" data-linenumber="11">
@@ -2820,12 +3259,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="40" data-linenumber="16">
- <span class="hits">40</span>
+ <li class="covered" data-hits="43" data-linenumber="16">
+ <span class="hits">43</span>
<code class="ruby"> result.lstrip</code>
</li>
<li class="never" data-hits="" data-linenumber="17">
@@ -2983,18 +3422,18 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(data, query)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="11">
- <span class="hits">24</span>
+ <li class="covered" data-hits="26" data-linenumber="11">
+ <span class="hits">26</span>
<code class="ruby"> @data = Hashie::Mash.new(data)</code>
</li>
- <li class="covered" data-hits="24" data-linenumber="12">
- <span class="hits">24</span>
+ <li class="covered" data-hits="26" data-linenumber="12">
+ <span class="hits">26</span>
<code class="ruby"> @query = query</code>
</li>
<li class="never" data-hits="" data-linenumber="13">
@@ -3018,17 +3457,198 @@
</ol>
</pre>
</div>
+ <div class="source_table" id="3b534dd15131bb6d8770662787bf8f8099b5cf25">
+ <div class="header">
+ <h3>lib/gqli/subscription.rb</h3>
+ <h4><span class="yellow">88.89 %</span> covered</h4>
+ <div>
+ <b>9</b> relevant lines.
+ <span class="green"><b>8</b> lines covered</span> and
+ <span class="red"><b>1</b> lines missed.</span>
+ </div>
+ </div>
+
+ <pre>
+ <ol>
+
+ <li class="never" data-hits="" data-linenumber="1">
+
+
+ <code class="ruby"># frozen_string_literal: true</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="2">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="3">
+ <span class="hits">1</span>
+
+ <code class="ruby">module GQLi</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="4">
+
+
+ <code class="ruby"> # Query node</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="5">
+ <span class="hits">1</span>
+
+ <code class="ruby"> class Subscription < Base</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="6">
+
+
+ <code class="ruby"> # Serializes to a GraphQL string</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def to_gql</code>
+ </li>
+
+ <li class="covered" data-hits="8" data-linenumber="8">
+ <span class="hits">8</span>
+
+ <code class="ruby"> result = <<~GQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="9">
+
+
+ <code class="ruby"> subscription #{__name ? __name + ' ' : ''}{</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="10">
+
+
+ <code class="ruby"> #{__nodes.map(&:to_gql).join("\n")}</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="11">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="12">
+
+
+ <code class="ruby"> GQL</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="13">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="8" data-linenumber="14">
+ <span class="hits">8</span>
+
+ <code class="ruby"> result.lstrip</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="15">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="16">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="17">
+
+
+ <code class="ruby"> # Delegates itself to the client to be executed</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="18">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def __execute(client)</code>
+ </li>
+
+ <li class="missed" data-hits="0" data-linenumber="19">
+
+
+ <code class="ruby"> client.execute(self)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="20">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="21">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="22">
+
+
+ <code class="ruby"> # Serializes to a GraphQL string</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="23">
+ <span class="hits">1</span>
+
+ <code class="ruby"> def to_s</code>
+ </li>
+
+ <li class="covered" data-hits="2" data-linenumber="24">
+ <span class="hits">2</span>
+
+ <code class="ruby"> to_gql</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="25">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="26">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="27">
+
+
+ <code class="ruby">end</code>
+ </li>
+
+ </ol>
+ </pre>
+</div>
+
+
<div class="source_table" id="4c31f7a77052c02790c8c5c06fd2085c7022ac23">
<div class="header">
<h3>lib/gqli/validation.rb</h3>
- <h4><span class="green">91.18 %</span> covered</h4>
+ <h4><span class="green">91.51 %</span> covered</h4>
<div>
- <b>102</b> relevant lines.
- <span class="green"><b>93</b> lines covered</span> and
+ <b>106</b> relevant lines.
+ <span class="green"><b>97</b> lines covered</span> and
<span class="red"><b>9</b> lines missed.</span>
</div>
</div>
<pre>
@@ -3080,36 +3700,36 @@
<span class="hits">1</span>
<code class="ruby"> def initialize(schema, query)</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="9">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="9">
+ <span class="hits">31</span>
<code class="ruby"> @schema = schema</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="10">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="10">
+ <span class="hits">31</span>
<code class="ruby"> @query = query</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="11">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="11">
+ <span class="hits">31</span>
<code class="ruby"> @errors = []</code>
</li>
<li class="never" data-hits="" data-linenumber="12">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="30" data-linenumber="13">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="13">
+ <span class="hits">31</span>
<code class="ruby"> validate</code>
</li>
<li class="never" data-hits="" data-linenumber="14">
@@ -3134,12 +3754,12 @@
<span class="hits">1</span>
<code class="ruby"> def valid?</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="18">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="18">
+ <span class="hits">31</span>
<code class="ruby"> errors.empty?</code>
</li>
<li class="never" data-hits="" data-linenumber="19">
@@ -3170,42 +3790,42 @@
<span class="hits">1</span>
<code class="ruby"> def validate</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="24">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="24">
+ <span class="hits">31</span>
<code class="ruby"> fail 'Not a Query object' unless query.is_a?(Query)</code>
</li>
<li class="never" data-hits="" data-linenumber="25">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="60" data-linenumber="26">
- <span class="hits">60</span>
+ <li class="covered" data-hits="62" data-linenumber="26">
+ <span class="hits">62</span>
<code class="ruby"> query_type = types.find { |t| t.name.casecmp('query').zero? }</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="27">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="27">
+ <span class="hits">31</span>
<code class="ruby"> query.__nodes.each do |node|</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="28">
- <span class="hits">30</span>
+ <li class="covered" data-hits="32" data-linenumber="28">
+ <span class="hits">32</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="30" data-linenumber="29">
- <span class="hits">30</span>
+ <li class="covered" data-hits="32" data-linenumber="29">
+ <span class="hits">32</span>
<code class="ruby"> validate_node(query_type, node)</code>
</li>
<li class="never" data-hits="" data-linenumber="30">
@@ -3236,12 +3856,12 @@
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="30" data-linenumber="35">
- <span class="hits">30</span>
+ <li class="covered" data-hits="31" data-linenumber="35">
+ <span class="hits">31</span>
<code class="ruby"> true</code>
</li>
<li class="never" data-hits="" data-linenumber="36">
@@ -3281,908 +3901,956 @@
</li>
<li class="covered" data-hits="1" data-linenumber="42">
<span class="hits">1</span>
+ <code class="ruby"> def remove_alias(name)</code>
+ </li>
+
+ <li class="covered" data-hits="87" data-linenumber="43">
+ <span class="hits">87</span>
+
+ <code class="ruby"> return name unless name.include?(':')</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="44">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="2" data-linenumber="45">
+ <span class="hits">2</span>
+
+ <code class="ruby"> name.split(':')[1].strip</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="46">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="47">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="48">
+ <span class="hits">1</span>
+
<code class="ruby"> def types</code>
</li>
- <li class="covered" data-hits="132" data-linenumber="43">
- <span class="hits">132</span>
+ <li class="covered" data-hits="150" data-linenumber="49">
+ <span class="hits">150</span>
<code class="ruby"> schema.types</code>
</li>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="50">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="51">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="46">
+ <li class="covered" data-hits="1" data-linenumber="52">
<span class="hits">1</span>
<code class="ruby"> def validate_node(parent_type, node)</code>
</li>
- <li class="covered" data-hits="88" data-linenumber="47">
- <span class="hits">88</span>
+ <li class="covered" data-hits="94" data-linenumber="53">
+ <span class="hits">94</span>
<code class="ruby"> validate_directives(node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="48">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="85" data-linenumber="49">
- <span class="hits">85</span>
+ <li class="covered" data-hits="91" data-linenumber="55">
+ <span class="hits">91</span>
<code class="ruby"> return valid_match_node?(parent_type, node) if node.__name.start_with?('... on')</code>
</li>
- <li class="never" data-hits="" data-linenumber="50">
+ <li class="never" data-hits="" data-linenumber="56">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="449" data-linenumber="51">
- <span class="hits">449</span>
+ <li class="covered" data-hits="87" data-linenumber="57">
+ <span class="hits">87</span>
- <code class="ruby"> node_type = parent_type.fetch('fields', []).find { |f| f.name == node.__name }</code>
+ <code class="ruby"> node_name = remove_alias(node.__name)</code>
</li>
- <li class="covered" data-hits="81" data-linenumber="52">
- <span class="hits">81</span>
+ <li class="never" data-hits="" data-linenumber="58">
- <code class="ruby"> fail "Node type not found for '#{node.__name}'" if node_type.nil?</code>
+
+ <code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="53">
+ <li class="covered" data-hits="477" data-linenumber="59">
+ <span class="hits">477</span>
+ <code class="ruby"> node_type = parent_type.fetch('fields', []).find { |f| f.name == node_name }</code>
+ </li>
+
+ <li class="covered" data-hits="87" data-linenumber="60">
+ <span class="hits">87</span>
+ <code class="ruby"> fail "Node type not found for '#{node_name}'" if node_type.nil?</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="61">
+
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="78" data-linenumber="54">
- <span class="hits">78</span>
+ <li class="covered" data-hits="84" data-linenumber="62">
+ <span class="hits">84</span>
<code class="ruby"> validate_params(node_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="55">
+ <li class="never" data-hits="" data-linenumber="63">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="78" data-linenumber="56">
- <span class="hits">78</span>
+ <li class="covered" data-hits="84" data-linenumber="64">
+ <span class="hits">84</span>
<code class="ruby"> resolved_node_type = type_for(node_type)</code>
</li>
- <li class="covered" data-hits="78" data-linenumber="57">
- <span class="hits">78</span>
+ <li class="covered" data-hits="84" data-linenumber="65">
+ <span class="hits">84</span>
- <code class="ruby"> fail "Node type not found for '#{node.__name}'" if resolved_node_type.nil?</code>
+ <code class="ruby"> fail "Node type not found for '#{node_name}'" if resolved_node_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="58">
+ <li class="never" data-hits="" data-linenumber="66">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="78" data-linenumber="59">
- <span class="hits">78</span>
+ <li class="covered" data-hits="84" data-linenumber="67">
+ <span class="hits">84</span>
<code class="ruby"> validate_nesting_node(resolved_node_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="60">
+ <li class="never" data-hits="" data-linenumber="68">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="132" data-linenumber="61">
- <span class="hits">132</span>
+ <li class="covered" data-hits="142" data-linenumber="69">
+ <span class="hits">142</span>
<code class="ruby"> node.__nodes.each { |n| validate_node(resolved_node_type, n) }</code>
</li>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="70">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="63">
+ <li class="never" data-hits="" data-linenumber="71">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="64">
+ <li class="covered" data-hits="1" data-linenumber="72">
<span class="hits">1</span>
<code class="ruby"> def valid_match_node?(parent_type, node)</code>
</li>
- <li class="covered" data-hits="14" data-linenumber="65">
+ <li class="covered" data-hits="14" data-linenumber="73">
<span class="hits">14</span>
<code class="ruby"> return if parent_type.fetch('possibleTypes', []).find { |t| t.name == node.__name.gsub('... on ', '') }</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="66">
+ <li class="covered" data-hits="2" data-linenumber="74">
<span class="hits">2</span>
<code class="ruby"> fail "Match type '#{node.__name.gsub('... on ', '')}' invalid"</code>
</li>
- <li class="never" data-hits="" data-linenumber="67">
+ <li class="never" data-hits="" data-linenumber="75">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="68">
+ <li class="never" data-hits="" data-linenumber="76">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="69">
+ <li class="covered" data-hits="1" data-linenumber="77">
<span class="hits">1</span>
<code class="ruby"> def validate_directives(node)</code>
</li>
- <li class="covered" data-hits="88" data-linenumber="70">
- <span class="hits">88</span>
+ <li class="covered" data-hits="94" data-linenumber="78">
+ <span class="hits">94</span>
- <code class="ruby"> return unless node.__params.size == 1</code>
+ <code class="ruby"> return unless node.__params.size >= 1</code>
</li>
- <li class="covered" data-hits="17" data-linenumber="71">
- <span class="hits">17</span>
+ <li class="covered" data-hits="21" data-linenumber="79">
+ <span class="hits">21</span>
<code class="ruby"> node.__params.first.tap do |k, v|</code>
</li>
- <li class="covered" data-hits="17" data-linenumber="72">
- <span class="hits">17</span>
+ <li class="covered" data-hits="21" data-linenumber="80">
+ <span class="hits">21</span>
<code class="ruby"> break unless k.to_s.start_with?('@')</code>
</li>
- <li class="never" data-hits="" data-linenumber="73">
+ <li class="never" data-hits="" data-linenumber="81">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="7" data-linenumber="74">
+ <li class="covered" data-hits="7" data-linenumber="82">
<span class="hits">7</span>
<code class="ruby"> fail "Directive unknown '#{k}'" unless %i[@include @skip].include?(k)</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="75">
+ <li class="covered" data-hits="6" data-linenumber="83">
<span class="hits">6</span>
<code class="ruby"> fail "Missing arguments for directive '#{k}'" if v.nil? || !v.is_a?(::Hash) || v.empty?</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="76">
+ <li class="covered" data-hits="4" data-linenumber="84">
<span class="hits">4</span>
<code class="ruby"> v.each do |arg, value|</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="77">
+ <li class="covered" data-hits="5" data-linenumber="85">
<span class="hits">5</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="5" data-linenumber="78">
+ <li class="covered" data-hits="5" data-linenumber="86">
<span class="hits">5</span>
<code class="ruby"> fail "Invalid argument '#{arg}' for directive '#{k}'" if arg.to_s != 'if'</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="79">
+ <li class="covered" data-hits="3" data-linenumber="87">
<span class="hits">3</span>
<code class="ruby"> fail "Invalid value for 'if`, must be a boolean" if value != !!value</code>
</li>
- <li class="never" data-hits="" data-linenumber="80">
+ <li class="never" data-hits="" data-linenumber="88">
<code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="81">
+ <li class="covered" data-hits="3" data-linenumber="89">
<span class="hits">3</span>
<code class="ruby"> errors << e</code>
</li>
- <li class="never" data-hits="" data-linenumber="82">
+ <li class="never" data-hits="" data-linenumber="90">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="83">
+ <li class="never" data-hits="" data-linenumber="91">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="84">
+ <li class="never" data-hits="" data-linenumber="92">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="85">
+ <li class="never" data-hits="" data-linenumber="93">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="86">
+ <li class="never" data-hits="" data-linenumber="94">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="87">
+ <li class="covered" data-hits="1" data-linenumber="95">
<span class="hits">1</span>
<code class="ruby"> def validate_params(node_type, node)</code>
</li>
- <li class="covered" data-hits="98" data-linenumber="88">
- <span class="hits">98</span>
+ <li class="covered" data-hits="107" data-linenumber="96">
+ <span class="hits">107</span>
<code class="ruby"> node.__params.reject { |p, _| p.to_s.start_with?('@') }.each do |param, value|</code>
</li>
- <li class="covered" data-hits="16" data-linenumber="89">
- <span class="hits">16</span>
+ <li class="covered" data-hits="19" data-linenumber="97">
+ <span class="hits">19</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="90" data-linenumber="90">
- <span class="hits">90</span>
+ <li class="covered" data-hits="105" data-linenumber="98">
+ <span class="hits">105</span>
<code class="ruby"> arg = node_type.fetch('args', []).find { |a| a.name == param.to_s }</code>
</li>
- <li class="covered" data-hits="16" data-linenumber="91">
- <span class="hits">16</span>
+ <li class="covered" data-hits="19" data-linenumber="99">
+ <span class="hits">19</span>
<code class="ruby"> fail "Invalid argument '#{param}'" if arg.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="92">
+ <li class="never" data-hits="" data-linenumber="100">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="14" data-linenumber="93">
- <span class="hits">14</span>
+ <li class="covered" data-hits="17" data-linenumber="101">
+ <span class="hits">17</span>
<code class="ruby"> arg_type = type_for(arg)</code>
</li>
- <li class="covered" data-hits="14" data-linenumber="94">
- <span class="hits">14</span>
+ <li class="covered" data-hits="17" data-linenumber="102">
+ <span class="hits">17</span>
<code class="ruby"> fail "Argument type not found for '#{param}'" if arg_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="95">
+ <li class="never" data-hits="" data-linenumber="103">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="14" data-linenumber="96">
- <span class="hits">14</span>
+ <li class="covered" data-hits="17" data-linenumber="104">
+ <span class="hits">17</span>
<code class="ruby"> validate_value_for_type(arg_type, value, param)</code>
</li>
- <li class="never" data-hits="" data-linenumber="97">
+ <li class="never" data-hits="" data-linenumber="105">
<code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="98">
+ <li class="covered" data-hits="8" data-linenumber="106">
<span class="hits">8</span>
<code class="ruby"> errors << e</code>
</li>
- <li class="never" data-hits="" data-linenumber="99">
+ <li class="never" data-hits="" data-linenumber="107">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="100">
+ <li class="never" data-hits="" data-linenumber="108">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="101">
+ <li class="never" data-hits="" data-linenumber="109">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="102">
+ <li class="never" data-hits="" data-linenumber="110">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="103">
+ <li class="covered" data-hits="1" data-linenumber="111">
<span class="hits">1</span>
<code class="ruby"> def validate_nesting_node(node_type, node)</code>
</li>
- <li class="covered" data-hits="78" data-linenumber="104">
- <span class="hits">78</span>
+ <li class="covered" data-hits="84" data-linenumber="112">
+ <span class="hits">84</span>
<code class="ruby"> fail "Invalid object for node '#{node.__name}'" unless valid_object_node?(node_type, node)</code>
</li>
- <li class="never" data-hits="" data-linenumber="105">
+ <li class="never" data-hits="" data-linenumber="113">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="106">
+ <li class="never" data-hits="" data-linenumber="114">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="107">
+ <li class="covered" data-hits="1" data-linenumber="115">
<span class="hits">1</span>
<code class="ruby"> def valid_object_node?(node_type, node)</code>
</li>
- <li class="covered" data-hits="78" data-linenumber="108">
- <span class="hits">78</span>
+ <li class="covered" data-hits="84" data-linenumber="116">
+ <span class="hits">84</span>
<code class="ruby"> return false if %w[OBJECT INTERFACE].include?(node_type.kind) && node.__nodes.empty?</code>
</li>
- <li class="covered" data-hits="74" data-linenumber="109">
- <span class="hits">74</span>
+ <li class="covered" data-hits="80" data-linenumber="117">
+ <span class="hits">80</span>
<code class="ruby"> true</code>
</li>
- <li class="never" data-hits="" data-linenumber="110">
+ <li class="never" data-hits="" data-linenumber="118">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="111">
+ <li class="never" data-hits="" data-linenumber="119">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="112">
+ <li class="covered" data-hits="1" data-linenumber="120">
<span class="hits">1</span>
<code class="ruby"> def valid_array_node?(node_type, node)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="113">
+ <li class="missed" data-hits="0" data-linenumber="121">
<code class="ruby"> return false if %w[OBJECT INTERFACE].include?(node_type.kind) && node.__nodes.empty?</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="114">
+ <li class="missed" data-hits="0" data-linenumber="122">
<code class="ruby"> true</code>
</li>
- <li class="never" data-hits="" data-linenumber="115">
+ <li class="never" data-hits="" data-linenumber="123">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="116">
+ <li class="never" data-hits="" data-linenumber="124">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="117">
+ <li class="covered" data-hits="1" data-linenumber="125">
<span class="hits">1</span>
<code class="ruby"> def value_type_error(is_type, should_be, for_arg)</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="118">
+ <li class="covered" data-hits="6" data-linenumber="126">
<span class="hits">6</span>
<code class="ruby"> should_be = should_be.kind == 'ENUM' ? 'Enum' : should_be.name</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="119">
+ <li class="covered" data-hits="6" data-linenumber="127">
<span class="hits">6</span>
<code class="ruby"> additional_message = '. Wrap the value with `__enum`.' if should_be == 'Enum'</code>
</li>
- <li class="never" data-hits="" data-linenumber="120">
+ <li class="never" data-hits="" data-linenumber="128">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="6" data-linenumber="121">
+ <li class="covered" data-hits="6" data-linenumber="129">
<span class="hits">6</span>
<code class="ruby"> fail "Value is '#{is_type}', but should be '#{should_be}' for '#{for_arg}'#{additional_message}"</code>
</li>
- <li class="never" data-hits="" data-linenumber="122">
+ <li class="never" data-hits="" data-linenumber="130">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="123">
+ <li class="never" data-hits="" data-linenumber="131">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="124">
+ <li class="covered" data-hits="1" data-linenumber="132">
<span class="hits">1</span>
<code class="ruby"> def validate_value_for_type(arg_type, value, for_arg)</code>
</li>
- <li class="covered" data-hits="20" data-linenumber="125">
- <span class="hits">20</span>
+ <li class="covered" data-hits="27" data-linenumber="133">
+ <span class="hits">27</span>
<code class="ruby"> case value</code>
</li>
- <li class="never" data-hits="" data-linenumber="126">
+ <li class="never" data-hits="" data-linenumber="134">
<code class="ruby"> when EnumValue</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="127">
+ <li class="covered" data-hits="2" data-linenumber="135">
<span class="hits">2</span>
<code class="ruby"> if arg_type.kind == 'ENUM' && !arg_type.enumValues.map(&:name).include?(value.to_s)</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="128">
+ <li class="missed" data-hits="0" data-linenumber="136">
<code class="ruby"> fail "Invalid value for Enum '#{arg_type.name}' for '#{for_arg}'"</code>
</li>
- <li class="never" data-hits="" data-linenumber="129">
+ <li class="never" data-hits="" data-linenumber="137">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="130">
+ <li class="never" data-hits="" data-linenumber="138">
<code class="ruby"> when ::String</code>
</li>
- <li class="covered" data-hits="10" data-linenumber="131">
- <span class="hits">10</span>
+ <li class="covered" data-hits="12" data-linenumber="139">
+ <span class="hits">12</span>
<code class="ruby"> unless arg_type.name == 'String' || arg_type.name == 'ID'</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="132">
+ <li class="covered" data-hits="4" data-linenumber="140">
<span class="hits">4</span>
<code class="ruby"> value_type_error('String or ID', arg_type, for_arg)</code>
</li>
- <li class="never" data-hits="" data-linenumber="133">
+ <li class="never" data-hits="" data-linenumber="141">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="134">
+ <li class="never" data-hits="" data-linenumber="142">
<code class="ruby"> when ::Integer</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="135">
- <span class="hits">4</span>
+ <li class="covered" data-hits="5" data-linenumber="143">
+ <span class="hits">5</span>
<code class="ruby"> value_type_error('Integer', arg_type, for_arg) unless arg_type.name == 'Int'</code>
</li>
- <li class="never" data-hits="" data-linenumber="136">
+ <li class="never" data-hits="" data-linenumber="144">
<code class="ruby"> when ::Float</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="137">
+ <li class="missed" data-hits="0" data-linenumber="145">
<code class="ruby"> value_type_error('Float', arg_type, for_arg) unless arg_type.name == 'Float'</code>
</li>
- <li class="never" data-hits="" data-linenumber="138">
+ <li class="never" data-hits="" data-linenumber="146">
<code class="ruby"> when ::Hash</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="139">
- <span class="hits">4</span>
+ <li class="covered" data-hits="8" data-linenumber="147">
+ <span class="hits">8</span>
<code class="ruby"> validate_hash_value(arg_type, value, for_arg)</code>
</li>
- <li class="never" data-hits="" data-linenumber="140">
+ <li class="never" data-hits="" data-linenumber="148">
<code class="ruby"> when true, false</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="141">
+ <li class="missed" data-hits="0" data-linenumber="149">
<code class="ruby"> value_type_error('Boolean', arg_type, for_arg) unless arg_type.name == 'Boolean'</code>
</li>
- <li class="never" data-hits="" data-linenumber="142">
+ <li class="never" data-hits="" data-linenumber="150">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="143">
+ <li class="missed" data-hits="0" data-linenumber="151">
<code class="ruby"> value_type_error(value.class.name, arg_type, for_arg)</code>
</li>
- <li class="never" data-hits="" data-linenumber="144">
+ <li class="never" data-hits="" data-linenumber="152">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="145">
+ <li class="never" data-hits="" data-linenumber="153">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="146">
+ <li class="never" data-hits="" data-linenumber="154">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="147">
+ <li class="covered" data-hits="1" data-linenumber="155">
<span class="hits">1</span>
<code class="ruby"> def validate_hash_value(arg_type, value, for_arg)</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="148">
- <span class="hits">4</span>
+ <li class="covered" data-hits="8" data-linenumber="156">
+ <span class="hits">8</span>
<code class="ruby"> value_type_error('Object', arg_type.name, for_arg) unless arg_type.kind == 'INPUT_OBJECT'</code>
</li>
- <li class="never" data-hits="" data-linenumber="149">
+ <li class="never" data-hits="" data-linenumber="157">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="96" data-linenumber="150">
- <span class="hits">96</span>
+ <li class="covered" data-hits="190" data-linenumber="158">
+ <span class="hits">190</span>
<code class="ruby"> type = types.find { |f| f.name == arg_type.name }</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="151">
- <span class="hits">4</span>
+ <li class="covered" data-hits="8" data-linenumber="159">
+ <span class="hits">8</span>
<code class="ruby"> fail "Type not found for '#{arg_type.name}'" if type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="152">
+ <li class="never" data-hits="" data-linenumber="160">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="4" data-linenumber="153">
- <span class="hits">4</span>
+ <li class="covered" data-hits="8" data-linenumber="161">
+ <span class="hits">8</span>
<code class="ruby"> value.each do |k, v|</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="154">
- <span class="hits">6</span>
+ <li class="covered" data-hits="10" data-linenumber="162">
+ <span class="hits">10</span>
<code class="ruby"> begin</code>
</li>
- <li class="covered" data-hits="104" data-linenumber="155">
- <span class="hits">104</span>
+ <li class="covered" data-hits="119" data-linenumber="163">
+ <span class="hits">119</span>
<code class="ruby"> input_field = type.fetch('inputFields', []).find { |f| f.name == k.to_s }</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="156">
- <span class="hits">6</span>
+ <li class="covered" data-hits="10" data-linenumber="164">
+ <span class="hits">10</span>
<code class="ruby"> fail "Input field definition not found for '#{k}'" if input_field.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="157">
+ <li class="never" data-hits="" data-linenumber="165">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="6" data-linenumber="158">
- <span class="hits">6</span>
+ <li class="covered" data-hits="10" data-linenumber="166">
+ <span class="hits">10</span>
<code class="ruby"> input_field_type = type_for(input_field)</code>
</li>
- <li class="covered" data-hits="6" data-linenumber="159">
- <span class="hits">6</span>
+ <li class="covered" data-hits="10" data-linenumber="167">
+ <span class="hits">10</span>
<code class="ruby"> fail "Input field type not found for '#{k}'" if input_field_type.nil?</code>
</li>
- <li class="never" data-hits="" data-linenumber="160">
+ <li class="never" data-hits="" data-linenumber="168">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="6" data-linenumber="161">
- <span class="hits">6</span>
+ <li class="covered" data-hits="10" data-linenumber="169">
+ <span class="hits">10</span>
<code class="ruby"> validate_value_for_type(input_field_type, v, k)</code>
</li>
- <li class="never" data-hits="" data-linenumber="162">
+ <li class="never" data-hits="" data-linenumber="170">
<code class="ruby"> rescue StandardError => e</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="163">
+ <li class="missed" data-hits="0" data-linenumber="171">
<code class="ruby"> errors << e</code>
</li>
- <li class="never" data-hits="" data-linenumber="164">
+ <li class="never" data-hits="" data-linenumber="172">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="165">
+ <li class="never" data-hits="" data-linenumber="173">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="166">
+ <li class="never" data-hits="" data-linenumber="174">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="167">
+ <li class="never" data-hits="" data-linenumber="175">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="168">
+ <li class="covered" data-hits="1" data-linenumber="176">
<span class="hits">1</span>
<code class="ruby"> def type_for(field_type)</code>
</li>
- <li class="covered" data-hits="98" data-linenumber="169">
- <span class="hits">98</span>
+ <li class="covered" data-hits="111" data-linenumber="177">
+ <span class="hits">111</span>
<code class="ruby"> type = case field_type.type.kind</code>
</li>
- <li class="never" data-hits="" data-linenumber="170">
+ <li class="never" data-hits="" data-linenumber="178">
<code class="ruby"> when 'NON_NULL'</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="171">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="179">
+ <span class="hits">24</span>
<code class="ruby"> non_null_type(field_type.type.ofType)</code>
</li>
- <li class="never" data-hits="" data-linenumber="172">
+ <li class="never" data-hits="" data-linenumber="180">
<code class="ruby"> when 'LIST'</code>
</li>
- <li class="covered" data-hits="8" data-linenumber="173">
- <span class="hits">8</span>
+ <li class="covered" data-hits="10" data-linenumber="181">
+ <span class="hits">10</span>
<code class="ruby"> field_type.type.ofType</code>
</li>
- <li class="never" data-hits="" data-linenumber="174">
+ <li class="never" data-hits="" data-linenumber="182">
<code class="ruby"> when 'OBJECT', 'INTERFACE', 'INPUT_OBJECT'</code>
</li>
- <li class="covered" data-hits="32" data-linenumber="175">
- <span class="hits">32</span>
+ <li class="covered" data-hits="38" data-linenumber="183">
+ <span class="hits">38</span>
<code class="ruby"> field_type.type</code>
</li>
- <li class="never" data-hits="" data-linenumber="176">
+ <li class="never" data-hits="" data-linenumber="184">
<code class="ruby"> when 'SCALAR'</code>
</li>
- <li class="covered" data-hits="36" data-linenumber="177">
- <span class="hits">36</span>
+ <li class="covered" data-hits="39" data-linenumber="185">
+ <span class="hits">39</span>
<code class="ruby"> field_type.type</code>
</li>
- <li class="never" data-hits="" data-linenumber="178">
+ <li class="never" data-hits="" data-linenumber="186">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="179">
+ <li class="never" data-hits="" data-linenumber="187">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="978" data-linenumber="180">
- <span class="hits">978</span>
+ <li class="covered" data-hits="1137" data-linenumber="188">
+ <span class="hits">1137</span>
<code class="ruby"> types.find { |t| t.name == type.name }</code>
</li>
- <li class="never" data-hits="" data-linenumber="181">
+ <li class="never" data-hits="" data-linenumber="189">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="182">
+ <li class="never" data-hits="" data-linenumber="190">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="183">
+ <li class="covered" data-hits="1" data-linenumber="191">
<span class="hits">1</span>
<code class="ruby"> def non_null_type(non_null)</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="184">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="192">
+ <span class="hits">24</span>
<code class="ruby"> case non_null.kind</code>
</li>
- <li class="never" data-hits="" data-linenumber="185">
+ <li class="never" data-hits="" data-linenumber="193">
<code class="ruby"> when 'LIST'</code>
</li>
- <li class="covered" data-hits="22" data-linenumber="186">
- <span class="hits">22</span>
+ <li class="covered" data-hits="24" data-linenumber="194">
+ <span class="hits">24</span>
<code class="ruby"> non_null.ofType</code>
</li>
- <li class="never" data-hits="" data-linenumber="187">
+ <li class="never" data-hits="" data-linenumber="195">
<code class="ruby"> else</code>
</li>
- <li class="missed" data-hits="0" data-linenumber="188">
+ <li class="missed" data-hits="0" data-linenumber="196">
<code class="ruby"> non_null</code>
</li>
- <li class="never" data-hits="" data-linenumber="189">
+ <li class="never" data-hits="" data-linenumber="197">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="190">
+ <li class="never" data-hits="" data-linenumber="198">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="191">
+ <li class="never" data-hits="" data-linenumber="199">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="192">
+ <li class="never" data-hits="" data-linenumber="200">
<code class="ruby">end</code>
</li>
@@ -4194,12 +4862,12 @@
<div class="source_table" id="05ca502e27573f65843239369098f0fc2c85f3d3">
<div class="header">
<h3>spec/lib/gqli/client_spec.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>46</b> relevant lines.
- <span class="green"><b>46</b> lines covered</span> and
+ <b>50</b> relevant lines.
+ <span class="green"><b>50</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -4221,665 +4889,713 @@
<span class="hits">1</span>
<code class="ruby">describe GQLi::Client do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="4">
- <span class="hits">1</span>
+ <li class="covered" data-hits="8" data-linenumber="4">
+ <span class="hits">8</span>
- <code class="ruby"> let(:client) do</code>
+ <code class="ruby"> let(:space_id) { 'cfexampleapi' }</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="5">
- <span class="hits">4</span>
+ <li class="covered" data-hits="8" data-linenumber="5">
+ <span class="hits">8</span>
- <code class="ruby"> vcr('client') {</code>
+ <code class="ruby"> let(:token) { 'b4c0n73n7fu1' }</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="6">
- <span class="hits">4</span>
+ <li class="never" data-hits="" data-linenumber="6">
- <code class="ruby"> space_id = 'cfexampleapi'</code>
+
+ <code class="ruby"></code>
</li>
- <li class="covered" data-hits="4" data-linenumber="7">
- <span class="hits">4</span>
+ <li class="covered" data-hits="1" data-linenumber="7">
+ <span class="hits">1</span>
- <code class="ruby"> token = 'b4c0n73n7fu1'</code>
+ <code class="ruby"> let(:client) do</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="8">
- <span class="hits">4</span>
+ <li class="covered" data-hits="5" data-linenumber="8">
+ <span class="hits">5</span>
- <code class="ruby"> GQLi::Client.new(</code>
+ <code class="ruby"> vcr('client') {</code>
</li>
- <li class="never" data-hits="" data-linenumber="9">
+ <li class="covered" data-hits="5" data-linenumber="9">
+ <span class="hits">5</span>
-
- <code class="ruby"> "https://graphql.contentful.com/content/v1/spaces/#{space_id}",</code>
+ <code class="ruby"> GQLi::Contentful.create(space_id, token)</code>
</li>
<li class="never" data-hits="" data-linenumber="10">
- <code class="ruby"> headers: { "Authorization" => "Bearer #{token}" }</code>
+ <code class="ruby"> }</code>
</li>
<li class="never" data-hits="" data-linenumber="11">
- <code class="ruby"> )</code>
+ <code class="ruby"> end</code>
</li>
<li class="never" data-hits="" data-linenumber="12">
- <code class="ruby"> }</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="13">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="14">
-
-
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="15">
+ <li class="covered" data-hits="1" data-linenumber="13">
<span class="hits">1</span>
<code class="ruby"> let(:client_no_validations) do</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="16">
+ <li class="covered" data-hits="2" data-linenumber="14">
<span class="hits">2</span>
<code class="ruby"> vcr('client') {</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="17">
+ <li class="covered" data-hits="2" data-linenumber="15">
<span class="hits">2</span>
- <code class="ruby"> space_id = 'cfexampleapi'</code>
+ <code class="ruby"> GQLi::Contentful.create(</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="18">
- <span class="hits">2</span>
+ <li class="never" data-hits="" data-linenumber="16">
- <code class="ruby"> token = 'b4c0n73n7fu1'</code>
+
+ <code class="ruby"> space_id,</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="19">
- <span class="hits">2</span>
+ <li class="never" data-hits="" data-linenumber="17">
- <code class="ruby"> GQLi::Client.new(</code>
+
+ <code class="ruby"> token,</code>
</li>
+ <li class="never" data-hits="" data-linenumber="18">
+
+
+ <code class="ruby"> validate_query: false</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="19">
+
+
+ <code class="ruby"> )</code>
+ </li>
+
<li class="never" data-hits="" data-linenumber="20">
- <code class="ruby"> "https://graphql.contentful.com/content/v1/spaces/#{space_id}",</code>
+ <code class="ruby"> }</code>
</li>
<li class="never" data-hits="" data-linenumber="21">
- <code class="ruby"> headers: { "Authorization" => "Bearer #{token}" },</code>
+ <code class="ruby"> end</code>
</li>
<li class="never" data-hits="" data-linenumber="22">
- <code class="ruby"> validate_query: false</code>
+ <code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="23">
+ <li class="covered" data-hits="5" data-linenumber="23">
+ <span class="hits">5</span>
-
- <code class="ruby"> )</code>
+ <code class="ruby"> let(:dsl) { GQLi::DSL }</code>
</li>
<li class="never" data-hits="" data-linenumber="24">
- <code class="ruby"> }</code>
+ <code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="covered" data-hits="1" data-linenumber="25">
+ <span class="hits">1</span>
+ <code class="ruby"> describe 'default clients' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="26">
+ <span class="hits">1</span>
- <code class="ruby"> end</code>
+ <code class="ruby"> it 'contentful client' do</code>
</li>
- <li class="never" data-hits="" data-linenumber="26">
+ <li class="covered" data-hits="1" data-linenumber="27">
+ <span class="hits">1</span>
+ <code class="ruby"> expect(client).to be_a(GQLi::Client)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="28">
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="29">
+
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="5" data-linenumber="27">
- <span class="hits">5</span>
+ <li class="covered" data-hits="1" data-linenumber="30">
+ <span class="hits">1</span>
- <code class="ruby"> let(:dsl) { GQLi::DSL }</code>
+ <code class="ruby"> it 'github client' do</code>
</li>
- <li class="never" data-hits="" data-linenumber="28">
+ <li class="covered" data-hits="1" data-linenumber="31">
+ <span class="hits">1</span>
+ <code class="ruby"> client = GQLi::Github.create('foobar', validate_query: false)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="32">
+
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="29">
+ <li class="covered" data-hits="1" data-linenumber="33">
<span class="hits">1</span>
+ <code class="ruby"> expect(client).to be_a(GQLi::Client)</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="34">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="35">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="36">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="37">
+ <span class="hits">1</span>
+
<code class="ruby"> describe 'query can call the client to execute' do</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="30">
+ <li class="covered" data-hits="2" data-linenumber="38">
<span class="hits">2</span>
<code class="ruby"> subject { client }</code>
</li>
- <li class="never" data-hits="" data-linenumber="31">
+ <li class="never" data-hits="" data-linenumber="39">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="32">
+ <li class="covered" data-hits="1" data-linenumber="40">
<span class="hits">1</span>
<code class="ruby"> it '#__execute' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="33">
+ <li class="covered" data-hits="1" data-linenumber="41">
<span class="hits">1</span>
<code class="ruby"> vcr('catCollection') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="34">
+ <li class="covered" data-hits="1" data-linenumber="42">
<span class="hits">1</span>
<code class="ruby"> expect(</code>
</li>
- <li class="never" data-hits="" data-linenumber="35">
+ <li class="never" data-hits="" data-linenumber="43">
<code class="ruby"> dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="36">
+ <li class="covered" data-hits="1" data-linenumber="44">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="37">
+ <li class="covered" data-hits="1" data-linenumber="45">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="38">
+ <li class="covered" data-hits="1" data-linenumber="46">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="39">
+ <li class="never" data-hits="" data-linenumber="47">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="40">
+ <li class="never" data-hits="" data-linenumber="48">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="41">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> }.__execute(subject).data</code>
</li>
- <li class="never" data-hits="" data-linenumber="42">
+ <li class="never" data-hits="" data-linenumber="50">
<code class="ruby"> ).not_to be_empty</code>
</li>
- <li class="never" data-hits="" data-linenumber="43">
+ <li class="never" data-hits="" data-linenumber="51">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="44">
+ <li class="never" data-hits="" data-linenumber="52">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="45">
+ <li class="never" data-hits="" data-linenumber="53">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="46">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="47">
+ <li class="covered" data-hits="1" data-linenumber="55">
<span class="hits">1</span>
<code class="ruby"> context 'validations enabled' do</code>
</li>
- <li class="covered" data-hits="4" data-linenumber="48">
+ <li class="covered" data-hits="4" data-linenumber="56">
<span class="hits">4</span>
<code class="ruby"> subject { client }</code>
</li>
- <li class="never" data-hits="" data-linenumber="49">
+ <li class="never" data-hits="" data-linenumber="57">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="50">
+ <li class="covered" data-hits="1" data-linenumber="58">
<span class="hits">1</span>
<code class="ruby"> it 'upon instantiation caches the schema' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="51">
+ <li class="covered" data-hits="1" data-linenumber="59">
<span class="hits">1</span>
<code class="ruby"> expect(subject.schema.types).not_to be_empty</code>
</li>
- <li class="never" data-hits="" data-linenumber="52">
+ <li class="never" data-hits="" data-linenumber="60">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="53">
+ <li class="never" data-hits="" data-linenumber="61">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="54">
+ <li class="covered" data-hits="1" data-linenumber="62">
<span class="hits">1</span>
<code class="ruby"> it 'when executing a query performs schema validation' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="55">
+ <li class="covered" data-hits="1" data-linenumber="63">
<span class="hits">1</span>
<code class="ruby"> vcr('catCollection') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="56">
+ <li class="covered" data-hits="1" data-linenumber="64">
<span class="hits">1</span>
<code class="ruby"> expect(subject.execute(</code>
</li>
- <li class="never" data-hits="" data-linenumber="57">
+ <li class="never" data-hits="" data-linenumber="65">
<code class="ruby"> dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="58">
+ <li class="covered" data-hits="1" data-linenumber="66">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="59">
+ <li class="covered" data-hits="1" data-linenumber="67">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="60">
+ <li class="covered" data-hits="1" data-linenumber="68">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="61">
+ <li class="never" data-hits="" data-linenumber="69">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="70">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="63">
+ <li class="never" data-hits="" data-linenumber="71">
<code class="ruby"> }).data</code>
</li>
- <li class="never" data-hits="" data-linenumber="64">
+ <li class="never" data-hits="" data-linenumber="72">
<code class="ruby"> ).not_to be_empty</code>
</li>
- <li class="never" data-hits="" data-linenumber="65">
+ <li class="never" data-hits="" data-linenumber="73">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="2" data-linenumber="66">
+ <li class="covered" data-hits="2" data-linenumber="74">
<span class="hits">2</span>
<code class="ruby"> expect { subject.execute(</code>
</li>
- <li class="never" data-hits="" data-linenumber="67">
+ <li class="never" data-hits="" data-linenumber="75">
<code class="ruby"> dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="68">
+ <li class="covered" data-hits="1" data-linenumber="76">
<span class="hits">1</span>
<code class="ruby"> foobar</code>
</li>
- <li class="never" data-hits="" data-linenumber="69">
+ <li class="never" data-hits="" data-linenumber="77">
<code class="ruby"> }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="70">
+ <li class="covered" data-hits="1" data-linenumber="78">
<span class="hits">1</span>
<code class="ruby"> )}.to raise_exception <<~ERROR</code>
</li>
- <li class="never" data-hits="" data-linenumber="71">
+ <li class="never" data-hits="" data-linenumber="79">
<code class="ruby"> Validation Error: query is invalid - HTTP Request not sent.</code>
</li>
- <li class="never" data-hits="" data-linenumber="72">
+ <li class="never" data-hits="" data-linenumber="80">
<code class="ruby"></code>
</li>
- <li class="never" data-hits="" data-linenumber="73">
+ <li class="never" data-hits="" data-linenumber="81">
<code class="ruby"> Errors:</code>
</li>
- <li class="never" data-hits="" data-linenumber="74">
+ <li class="never" data-hits="" data-linenumber="82">
<code class="ruby"> - Node type not found for 'foobar'</code>
</li>
- <li class="never" data-hits="" data-linenumber="75">
+ <li class="never" data-hits="" data-linenumber="83">
<code class="ruby"> ERROR</code>
</li>
- <li class="never" data-hits="" data-linenumber="76">
+ <li class="never" data-hits="" data-linenumber="84">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="77">
+ <li class="never" data-hits="" data-linenumber="85">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="78">
+ <li class="never" data-hits="" data-linenumber="86">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="79">
+ <li class="covered" data-hits="1" data-linenumber="87">
<span class="hits">1</span>
<code class="ruby"> it 'can skip validations when using `#execute!`' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="80">
+ <li class="covered" data-hits="1" data-linenumber="88">
<span class="hits">1</span>
<code class="ruby"> vcr('validation_error') {</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="81">
+ <li class="covered" data-hits="2" data-linenumber="89">
<span class="hits">2</span>
<code class="ruby"> expect { subject.execute!(</code>
</li>
- <li class="never" data-hits="" data-linenumber="82">
+ <li class="never" data-hits="" data-linenumber="90">
<code class="ruby"> dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="83">
+ <li class="covered" data-hits="1" data-linenumber="91">
<span class="hits">1</span>
<code class="ruby"> foobar</code>
</li>
- <li class="never" data-hits="" data-linenumber="84">
+ <li class="never" data-hits="" data-linenumber="92">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="85">
+ <li class="never" data-hits="" data-linenumber="93">
<code class="ruby"> )}.to raise_exception([</code>
</li>
- <li class="never" data-hits="" data-linenumber="86">
+ <li class="never" data-hits="" data-linenumber="94">
<code class="ruby"> "Error: Bad Request",</code>
</li>
- <li class="never" data-hits="" data-linenumber="87">
+ <li class="never" data-hits="" data-linenumber="95">
<code class="ruby"> 'Body: {"errors":[{"message":"Cannot query field \"foobar\" on type \"Query\".","locations":[{"line":2,"column":3}]}]}'</code>
</li>
- <li class="never" data-hits="" data-linenumber="88">
+ <li class="never" data-hits="" data-linenumber="96">
<code class="ruby"> ].join("\n"))</code>
</li>
- <li class="never" data-hits="" data-linenumber="89">
+ <li class="never" data-hits="" data-linenumber="97">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="90">
+ <li class="never" data-hits="" data-linenumber="98">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="91">
+ <li class="never" data-hits="" data-linenumber="99">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="92">
+ <li class="never" data-hits="" data-linenumber="100">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="93">
+ <li class="covered" data-hits="1" data-linenumber="101">
<span class="hits">1</span>
<code class="ruby"> context 'validations disabled' do</code>
</li>
- <li class="covered" data-hits="3" data-linenumber="94">
+ <li class="covered" data-hits="3" data-linenumber="102">
<span class="hits">3</span>
<code class="ruby"> subject { client_no_validations }</code>
</li>
- <li class="never" data-hits="" data-linenumber="95">
+ <li class="never" data-hits="" data-linenumber="103">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="96">
+ <li class="covered" data-hits="1" data-linenumber="104">
<span class="hits">1</span>
<code class="ruby"> it 'upon instantiation doesnt cache the schema' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="97">
+ <li class="covered" data-hits="1" data-linenumber="105">
<span class="hits">1</span>
<code class="ruby"> expect(subject.schema).to be_nil</code>
</li>
- <li class="never" data-hits="" data-linenumber="98">
+ <li class="never" data-hits="" data-linenumber="106">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="99">
+ <li class="never" data-hits="" data-linenumber="107">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="100">
+ <li class="covered" data-hits="1" data-linenumber="108">
<span class="hits">1</span>
<code class="ruby"> it 'when executing a query doesnt perform schema validation' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="101">
+ <li class="covered" data-hits="1" data-linenumber="109">
<span class="hits">1</span>
<code class="ruby"> vcr('validation_error') {</code>
</li>
- <li class="covered" data-hits="2" data-linenumber="102">
+ <li class="covered" data-hits="2" data-linenumber="110">
<span class="hits">2</span>
<code class="ruby"> expect { subject.execute(</code>
</li>
- <li class="never" data-hits="" data-linenumber="103">
+ <li class="never" data-hits="" data-linenumber="111">
<code class="ruby"> dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="104">
+ <li class="covered" data-hits="1" data-linenumber="112">
<span class="hits">1</span>
<code class="ruby"> foobar</code>
</li>
- <li class="never" data-hits="" data-linenumber="105">
+ <li class="never" data-hits="" data-linenumber="113">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="106">
+ <li class="never" data-hits="" data-linenumber="114">
<code class="ruby"> )}.to raise_exception([</code>
</li>
- <li class="never" data-hits="" data-linenumber="107">
+ <li class="never" data-hits="" data-linenumber="115">
<code class="ruby"> "Error: Bad Request",</code>
</li>
- <li class="never" data-hits="" data-linenumber="108">
+ <li class="never" data-hits="" data-linenumber="116">
<code class="ruby"> 'Body: {"errors":[{"message":"Cannot query field \"foobar\" on type \"Query\".","locations":[{"line":2,"column":3}]}]}'</code>
</li>
- <li class="never" data-hits="" data-linenumber="109">
+ <li class="never" data-hits="" data-linenumber="117">
<code class="ruby"> ].join("\n"))</code>
</li>
- <li class="never" data-hits="" data-linenumber="110">
+ <li class="never" data-hits="" data-linenumber="118">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="111">
+ <li class="never" data-hits="" data-linenumber="119">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="112">
+ <li class="never" data-hits="" data-linenumber="120">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="113">
+ <li class="never" data-hits="" data-linenumber="121">
<code class="ruby">end</code>
</li>
@@ -4891,12 +5607,12 @@
<div class="source_table" id="a6d1c1911a021a8ab76d6b8afd1ba662a68cd017">
<div class="header">
<h3>spec/lib/gqli/introspection_spec.rb</h3>
<h4><span class="green">100.0 %</span> covered</h4>
<div>
- <b>174</b> relevant lines.
- <span class="green"><b>174</b> lines covered</span> and
+ <b>186</b> relevant lines.
+ <span class="green"><b>186</b> lines covered</span> and
<span class="red"><b>0</b> lines missed.</span>
</div>
</div>
<pre>
@@ -4918,1810 +5634,1942 @@
<span class="hits">1</span>
<code class="ruby">describe GQLi::Introspection do</code>
</li>
- <li class="covered" data-hits="18" data-linenumber="4">
- <span class="hits">18</span>
+ <li class="covered" data-hits="19" data-linenumber="4">
+ <span class="hits">19</span>
<code class="ruby"> let(:dsl) { GQLi::DSL }</code>
</li>
<li class="covered" data-hits="1" data-linenumber="5">
<span class="hits">1</span>
<code class="ruby"> let(:client) do</code>
</li>
- <li class="covered" data-hits="18" data-linenumber="6">
- <span class="hits">18</span>
+ <li class="covered" data-hits="19" data-linenumber="6">
+ <span class="hits">19</span>
<code class="ruby"> vcr('client') {</code>
</li>
- <li class="covered" data-hits="18" data-linenumber="7">
- <span class="hits">18</span>
+ <li class="covered" data-hits="19" data-linenumber="7">
+ <span class="hits">19</span>
<code class="ruby"> space_id = 'cfexampleapi'</code>
</li>
- <li class="covered" data-hits="18" data-linenumber="8">
- <span class="hits">18</span>
+ <li class="covered" data-hits="19" data-linenumber="8">
+ <span class="hits">19</span>
<code class="ruby"> token = 'b4c0n73n7fu1'</code>
</li>
- <li class="covered" data-hits="18" data-linenumber="9">
- <span class="hits">18</span>
+ <li class="covered" data-hits="19" data-linenumber="9">
+ <span class="hits">19</span>
- <code class="ruby"> GQLi::Client.new(</code>
+ <code class="ruby"> GQLi::Contentful.create(space_id, token)</code>
</li>
<li class="never" data-hits="" data-linenumber="10">
- <code class="ruby"> "https://graphql.contentful.com/content/v1/spaces/#{space_id}",</code>
+ <code class="ruby"> }</code>
</li>
<li class="never" data-hits="" data-linenumber="11">
- <code class="ruby"> headers: { "Authorization" => "Bearer #{token}" }</code>
+ <code class="ruby"> end</code>
</li>
<li class="never" data-hits="" data-linenumber="12">
- <code class="ruby"> )</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="13">
-
-
- <code class="ruby"> }</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="14">
-
-
- <code class="ruby"> end</code>
- </li>
-
- <li class="never" data-hits="" data-linenumber="15">
-
-
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="19" data-linenumber="16">
- <span class="hits">19</span>
+ <li class="covered" data-hits="20" data-linenumber="13">
+ <span class="hits">20</span>
<code class="ruby"> subject { client.schema }</code>
</li>
- <li class="never" data-hits="" data-linenumber="17">
+ <li class="never" data-hits="" data-linenumber="14">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="18">
+ <li class="covered" data-hits="1" data-linenumber="15">
<span class="hits">1</span>
<code class="ruby"> describe 'introspection schema' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="19">
+ <li class="covered" data-hits="1" data-linenumber="16">
<span class="hits">1</span>
<code class="ruby"> it 'queries the API for the schema' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="20">
+ <li class="covered" data-hits="1" data-linenumber="17">
<span class="hits">1</span>
<code class="ruby"> expect(subject.types).not_to be_empty</code>
</li>
- <li class="never" data-hits="" data-linenumber="21">
+ <li class="never" data-hits="" data-linenumber="18">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="22">
+ <li class="covered" data-hits="1" data-linenumber="19">
<span class="hits">1</span>
<code class="ruby"> expect(subject.types.map(&:name)).to include('Cat', 'CatCollection', 'Human')</code>
</li>
- <li class="never" data-hits="" data-linenumber="23">
+ <li class="never" data-hits="" data-linenumber="20">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="24">
+ <li class="never" data-hits="" data-linenumber="21">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="25">
+ <li class="never" data-hits="" data-linenumber="22">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="26">
+ <li class="covered" data-hits="1" data-linenumber="23">
<span class="hits">1</span>
<code class="ruby"> describe 'validations' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="27">
+ <li class="covered" data-hits="1" data-linenumber="24">
<span class="hits">1</span>
<code class="ruby"> it 'valid query returns true' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="28">
+ <li class="covered" data-hits="1" data-linenumber="25">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="never" data-hits="" data-linenumber="29">
+ <li class="never" data-hits="" data-linenumber="26">
<code class="ruby"> catCollection(</code>
</li>
- <li class="never" data-hits="" data-linenumber="30">
+ <li class="never" data-hits="" data-linenumber="27">
<code class="ruby"> locale:"en-US",</code>
</li>
- <li class="never" data-hits="" data-linenumber="31">
+ <li class="never" data-hits="" data-linenumber="28">
<code class="ruby"> limit: 1,</code>
</li>
- <li class="never" data-hits="" data-linenumber="32">
+ <li class="never" data-hits="" data-linenumber="29">
<code class="ruby"> where: {</code>
</li>
- <li class="never" data-hits="" data-linenumber="33">
+ <li class="never" data-hits="" data-linenumber="30">
<code class="ruby"> name:"Nyan Cat",</code>
</li>
- <li class="never" data-hits="" data-linenumber="34">
+ <li class="never" data-hits="" data-linenumber="31">
<code class="ruby"> OR: {</code>
</li>
- <li class="never" data-hits="" data-linenumber="35">
+ <li class="never" data-hits="" data-linenumber="32">
<code class="ruby"> name:"Happy Cat"</code>
</li>
- <li class="never" data-hits="" data-linenumber="36">
+ <li class="never" data-hits="" data-linenumber="33">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="37">
+ <li class="never" data-hits="" data-linenumber="34">
<code class="ruby"> }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="38">
+ <li class="covered" data-hits="1" data-linenumber="35">
<span class="hits">1</span>
<code class="ruby"> ) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="39">
+ <li class="covered" data-hits="1" data-linenumber="36">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="40">
+ <li class="covered" data-hits="1" data-linenumber="37">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="41">
+ <li class="covered" data-hits="1" data-linenumber="38">
<span class="hits">1</span>
<code class="ruby"> color</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="42">
+ <li class="covered" data-hits="1" data-linenumber="39">
<span class="hits">1</span>
<code class="ruby"> birthday</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="43">
+ <li class="covered" data-hits="1" data-linenumber="40">
<span class="hits">1</span>
<code class="ruby"> lives</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="44">
+ <li class="covered" data-hits="1" data-linenumber="41">
<span class="hits">1</span>
<code class="ruby"> bestFriend {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="45">
+ <li class="covered" data-hits="1" data-linenumber="42">
<span class="hits">1</span>
<code class="ruby"> __on('Cat') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="46">
+ <li class="covered" data-hits="1" data-linenumber="43">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="47">
+ <li class="never" data-hits="" data-linenumber="44">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="48">
+ <li class="never" data-hits="" data-linenumber="45">
<code class="ruby"> }</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="49">
+ <li class="covered" data-hits="1" data-linenumber="46">
<span class="hits">1</span>
<code class="ruby"> image {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="50">
+ <li class="covered" data-hits="1" data-linenumber="47">
<span class="hits">1</span>
<code class="ruby"> url</code>
</li>
- <li class="never" data-hits="" data-linenumber="51">
+ <li class="never" data-hits="" data-linenumber="48">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="52">
+ <li class="never" data-hits="" data-linenumber="49">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="53">
+ <li class="never" data-hits="" data-linenumber="50">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="54">
+ <li class="never" data-hits="" data-linenumber="51">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="55">
+ <li class="never" data-hits="" data-linenumber="52">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="56">
+ <li class="covered" data-hits="1" data-linenumber="53">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_truthy</code>
</li>
- <li class="never" data-hits="" data-linenumber="57">
+ <li class="never" data-hits="" data-linenumber="54">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="58">
+ <li class="covered" data-hits="1" data-linenumber="55">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="59">
+ <li class="covered" data-hits="1" data-linenumber="56">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_truthy</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="60">
+ <li class="covered" data-hits="1" data-linenumber="57">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).to be_empty</code>
</li>
- <li class="never" data-hits="" data-linenumber="61">
+ <li class="never" data-hits="" data-linenumber="58">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="62">
+ <li class="never" data-hits="" data-linenumber="59">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="63">
+ <li class="covered" data-hits="1" data-linenumber="60">
<span class="hits">1</span>
<code class="ruby"> it 'wrong node returns false' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="64">
+ <li class="covered" data-hits="1" data-linenumber="61">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="65">
+ <li class="covered" data-hits="1" data-linenumber="62">
<span class="hits">1</span>
<code class="ruby"> foo</code>
</li>
- <li class="never" data-hits="" data-linenumber="66">
+ <li class="never" data-hits="" data-linenumber="63">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="67">
+ <li class="never" data-hits="" data-linenumber="64">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="68">
+ <li class="covered" data-hits="1" data-linenumber="65">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="69">
+ <li class="never" data-hits="" data-linenumber="66">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="70">
+ <li class="covered" data-hits="1" data-linenumber="67">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="71">
+ <li class="covered" data-hits="1" data-linenumber="68">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="72">
+ <li class="covered" data-hits="1" data-linenumber="69">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="73">
+ <li class="covered" data-hits="1" data-linenumber="70">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Node type not found for 'foo'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="74">
+ <li class="never" data-hits="" data-linenumber="71">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="75">
+ <li class="never" data-hits="" data-linenumber="72">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="76">
+ <li class="covered" data-hits="1" data-linenumber="73">
<span class="hits">1</span>
<code class="ruby"> it 'object node that doesnt have proper values returns false' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="77">
+ <li class="covered" data-hits="1" data-linenumber="74">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="78">
+ <li class="covered" data-hits="1" data-linenumber="75">
<span class="hits">1</span>
<code class="ruby"> catCollection</code>
</li>
- <li class="never" data-hits="" data-linenumber="79">
+ <li class="never" data-hits="" data-linenumber="76">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="80">
+ <li class="never" data-hits="" data-linenumber="77">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="81">
+ <li class="covered" data-hits="1" data-linenumber="78">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="82">
+ <li class="never" data-hits="" data-linenumber="79">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="83">
+ <li class="covered" data-hits="1" data-linenumber="80">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="84">
+ <li class="covered" data-hits="1" data-linenumber="81">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="85">
+ <li class="covered" data-hits="1" data-linenumber="82">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="86">
+ <li class="covered" data-hits="1" data-linenumber="83">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid object for node 'catCollection'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="87">
+ <li class="never" data-hits="" data-linenumber="84">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="88">
+ <li class="never" data-hits="" data-linenumber="85">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="89">
+ <li class="covered" data-hits="1" data-linenumber="86">
<span class="hits">1</span>
<code class="ruby"> it 'object list node that doesnt have proper values returns false' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="90">
+ <li class="covered" data-hits="1" data-linenumber="87">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="91">
+ <li class="covered" data-hits="1" data-linenumber="88">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="92">
+ <li class="covered" data-hits="1" data-linenumber="89">
<span class="hits">1</span>
<code class="ruby"> items</code>
</li>
- <li class="never" data-hits="" data-linenumber="93">
+ <li class="never" data-hits="" data-linenumber="90">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="94">
+ <li class="never" data-hits="" data-linenumber="91">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="95">
+ <li class="never" data-hits="" data-linenumber="92">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="96">
+ <li class="covered" data-hits="1" data-linenumber="93">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="97">
+ <li class="never" data-hits="" data-linenumber="94">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="98">
+ <li class="covered" data-hits="1" data-linenumber="95">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="99">
+ <li class="covered" data-hits="1" data-linenumber="96">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="100">
+ <li class="covered" data-hits="1" data-linenumber="97">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="101">
+ <li class="covered" data-hits="1" data-linenumber="98">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid object for node 'items'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="102">
+ <li class="never" data-hits="" data-linenumber="99">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="103">
+ <li class="never" data-hits="" data-linenumber="100">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="104">
+ <li class="covered" data-hits="1" data-linenumber="101">
<span class="hits">1</span>
<code class="ruby"> it 'type matching on invalid type returns false' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="105">
+ <li class="covered" data-hits="1" data-linenumber="102">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="106">
+ <li class="covered" data-hits="1" data-linenumber="103">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="107">
+ <li class="covered" data-hits="1" data-linenumber="104">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="108">
+ <li class="covered" data-hits="1" data-linenumber="105">
<span class="hits">1</span>
<code class="ruby"> bestFriend {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="109">
+ <li class="covered" data-hits="1" data-linenumber="106">
<span class="hits">1</span>
<code class="ruby"> __on('InvalidType') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="110">
+ <li class="covered" data-hits="1" data-linenumber="107">
<span class="hits">1</span>
<code class="ruby"> foo</code>
</li>
- <li class="never" data-hits="" data-linenumber="111">
+ <li class="never" data-hits="" data-linenumber="108">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="112">
+ <li class="never" data-hits="" data-linenumber="109">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="113">
+ <li class="never" data-hits="" data-linenumber="110">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="114">
+ <li class="never" data-hits="" data-linenumber="111">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="115">
+ <li class="never" data-hits="" data-linenumber="112">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="116">
+ <li class="never" data-hits="" data-linenumber="113">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="117">
+ <li class="covered" data-hits="1" data-linenumber="114">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="118">
+ <li class="never" data-hits="" data-linenumber="115">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="119">
+ <li class="covered" data-hits="1" data-linenumber="116">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="120">
+ <li class="covered" data-hits="1" data-linenumber="117">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="121">
+ <li class="covered" data-hits="1" data-linenumber="118">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="122">
+ <li class="covered" data-hits="1" data-linenumber="119">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Match type 'InvalidType' invalid")</code>
</li>
- <li class="never" data-hits="" data-linenumber="123">
+ <li class="never" data-hits="" data-linenumber="120">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="124">
+ <li class="never" data-hits="" data-linenumber="121">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="125">
+ <li class="covered" data-hits="1" data-linenumber="122">
<span class="hits">1</span>
<code class="ruby"> it 'invalid arguments return false' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="126">
+ <li class="covered" data-hits="1" data-linenumber="123">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="127">
+ <li class="covered" data-hits="1" data-linenumber="124">
<span class="hits">1</span>
<code class="ruby"> catCollection(invalidParam: 1) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="128">
+ <li class="covered" data-hits="1" data-linenumber="125">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="129">
+ <li class="covered" data-hits="1" data-linenumber="126">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="130">
+ <li class="never" data-hits="" data-linenumber="127">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="131">
+ <li class="never" data-hits="" data-linenumber="128">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="132">
+ <li class="never" data-hits="" data-linenumber="129">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="133">
+ <li class="never" data-hits="" data-linenumber="130">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="134">
+ <li class="covered" data-hits="1" data-linenumber="131">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="135">
+ <li class="never" data-hits="" data-linenumber="132">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="136">
+ <li class="covered" data-hits="1" data-linenumber="133">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="137">
+ <li class="covered" data-hits="1" data-linenumber="134">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="138">
+ <li class="covered" data-hits="1" data-linenumber="135">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="139">
+ <li class="covered" data-hits="1" data-linenumber="136">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid argument 'invalidParam'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="140">
+ <li class="never" data-hits="" data-linenumber="137">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="141">
+ <li class="never" data-hits="" data-linenumber="138">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="142">
+ <li class="covered" data-hits="1" data-linenumber="139">
<span class="hits">1</span>
<code class="ruby"> it 'invalid argument type returns false' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="143">
+ <li class="covered" data-hits="1" data-linenumber="140">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="144">
+ <li class="covered" data-hits="1" data-linenumber="141">
<span class="hits">1</span>
<code class="ruby"> catCollection(limit: 'foo') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="145">
+ <li class="covered" data-hits="1" data-linenumber="142">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="146">
+ <li class="covered" data-hits="1" data-linenumber="143">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="147">
+ <li class="never" data-hits="" data-linenumber="144">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="148">
+ <li class="never" data-hits="" data-linenumber="145">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="149">
+ <li class="never" data-hits="" data-linenumber="146">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="150">
+ <li class="never" data-hits="" data-linenumber="147">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="151">
+ <li class="covered" data-hits="1" data-linenumber="148">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="152">
+ <li class="never" data-hits="" data-linenumber="149">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="153">
+ <li class="covered" data-hits="1" data-linenumber="150">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="154">
+ <li class="covered" data-hits="1" data-linenumber="151">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="155">
+ <li class="covered" data-hits="1" data-linenumber="152">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="156">
+ <li class="covered" data-hits="1" data-linenumber="153">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Value is 'String or ID', but should be 'Int' for 'limit'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="157">
+ <li class="never" data-hits="" data-linenumber="154">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="158">
+ <li class="never" data-hits="" data-linenumber="155">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="159">
+ <li class="covered" data-hits="1" data-linenumber="156">
<span class="hits">1</span>
<code class="ruby"> describe 'enum values' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="160">
+ <li class="covered" data-hits="1" data-linenumber="157">
<span class="hits">1</span>
<code class="ruby"> it 'can create a query with an enum as a filter and validations should not fail' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="161">
+ <li class="covered" data-hits="1" data-linenumber="158">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="162">
+ <li class="covered" data-hits="1" data-linenumber="159">
<span class="hits">1</span>
<code class="ruby"> catCollection(order: __enum('lives_ASC')) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="163">
+ <li class="covered" data-hits="1" data-linenumber="160">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="164">
+ <li class="covered" data-hits="1" data-linenumber="161">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="165">
+ <li class="never" data-hits="" data-linenumber="162">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="166">
+ <li class="never" data-hits="" data-linenumber="163">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="167">
+ <li class="never" data-hits="" data-linenumber="164">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="168">
+ <li class="never" data-hits="" data-linenumber="165">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="169">
+ <li class="covered" data-hits="1" data-linenumber="166">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_truthy</code>
</li>
- <li class="never" data-hits="" data-linenumber="170">
+ <li class="never" data-hits="" data-linenumber="167">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="171">
+ <li class="covered" data-hits="1" data-linenumber="168">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="172">
+ <li class="covered" data-hits="1" data-linenumber="169">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_truthy</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="173">
+ <li class="covered" data-hits="1" data-linenumber="170">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).to be_empty</code>
</li>
- <li class="never" data-hits="" data-linenumber="174">
+ <li class="never" data-hits="" data-linenumber="171">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="175">
+ <li class="never" data-hits="" data-linenumber="172">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="176">
+ <li class="covered" data-hits="1" data-linenumber="173">
<span class="hits">1</span>
<code class="ruby"> it 'fails when enum value is not provided properly' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="177">
+ <li class="covered" data-hits="1" data-linenumber="174">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="178">
+ <li class="covered" data-hits="1" data-linenumber="175">
<span class="hits">1</span>
<code class="ruby"> catCollection(order: 'lives_ASC') {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="179">
+ <li class="covered" data-hits="1" data-linenumber="176">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="180">
+ <li class="covered" data-hits="1" data-linenumber="177">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="181">
+ <li class="never" data-hits="" data-linenumber="178">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="182">
+ <li class="never" data-hits="" data-linenumber="179">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="183">
+ <li class="never" data-hits="" data-linenumber="180">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="184">
+ <li class="never" data-hits="" data-linenumber="181">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="185">
+ <li class="covered" data-hits="1" data-linenumber="182">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="186">
+ <li class="never" data-hits="" data-linenumber="183">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="187">
+ <li class="covered" data-hits="1" data-linenumber="184">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="188">
+ <li class="covered" data-hits="1" data-linenumber="185">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="189">
+ <li class="covered" data-hits="1" data-linenumber="186">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="190">
+ <li class="covered" data-hits="1" data-linenumber="187">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Value is 'String or ID', but should be 'Enum' for 'order'. Wrap the value with `__enum`.")</code>
</li>
- <li class="never" data-hits="" data-linenumber="191">
+ <li class="never" data-hits="" data-linenumber="188">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="192">
+ <li class="never" data-hits="" data-linenumber="189">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="193">
+ <li class="covered" data-hits="1" data-linenumber="190">
<span class="hits">1</span>
<code class="ruby"> it 'fails when enum value is not provided properly and is not a string' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="194">
+ <li class="covered" data-hits="1" data-linenumber="191">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="195">
+ <li class="covered" data-hits="1" data-linenumber="192">
<span class="hits">1</span>
<code class="ruby"> catCollection(order: 1) {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="196">
+ <li class="covered" data-hits="1" data-linenumber="193">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="197">
+ <li class="covered" data-hits="1" data-linenumber="194">
<span class="hits">1</span>
<code class="ruby"> name</code>
</li>
- <li class="never" data-hits="" data-linenumber="198">
+ <li class="never" data-hits="" data-linenumber="195">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="199">
+ <li class="never" data-hits="" data-linenumber="196">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="200">
+ <li class="never" data-hits="" data-linenumber="197">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="201">
+ <li class="never" data-hits="" data-linenumber="198">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="202">
+ <li class="covered" data-hits="1" data-linenumber="199">
<span class="hits">1</span>
<code class="ruby"> expect(subject.valid?(query)).to be_falsey</code>
</li>
- <li class="never" data-hits="" data-linenumber="203">
+ <li class="never" data-hits="" data-linenumber="200">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="204">
+ <li class="covered" data-hits="1" data-linenumber="201">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="205">
+ <li class="covered" data-hits="1" data-linenumber="202">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="206">
+ <li class="covered" data-hits="1" data-linenumber="203">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="207">
+ <li class="covered" data-hits="1" data-linenumber="204">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Value is 'Integer', but should be 'Enum' for 'order'. Wrap the value with `__enum`.")</code>
</li>
- <li class="never" data-hits="" data-linenumber="208">
+ <li class="never" data-hits="" data-linenumber="205">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="209">
+ <li class="never" data-hits="" data-linenumber="206">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="210">
+ <li class="never" data-hits="" data-linenumber="207">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="211">
+ <li class="covered" data-hits="1" data-linenumber="208">
<span class="hits">1</span>
+ <code class="ruby"> describe 'aliases' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="209">
+ <span class="hits">1</span>
+
+ <code class="ruby"> it 'can create a query with an alias' do</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="210">
+ <span class="hits">1</span>
+
+ <code class="ruby"> query = dsl.query {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="211">
+
+
+ <code class="ruby"> __node('pinned: catCollection', where: {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="212">
+
+
+ <code class="ruby"> sys: { id_in: 'nyancat' }</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="213">
+ <span class="hits">1</span>
+
+ <code class="ruby"> }) {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="214">
+ <span class="hits">1</span>
+
+ <code class="ruby"> items {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="215">
+ <span class="hits">1</span>
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="216">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="217">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="218">
+
+
+ <code class="ruby"> __node('unpinned: catCollection', where: {</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="219">
+
+
+ <code class="ruby"> sys: { id_not_in: 'nyancat' }</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="220">
+ <span class="hits">1</span>
+
+ <code class="ruby"> }, limit: 4) {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="221">
+ <span class="hits">1</span>
+
+ <code class="ruby"> items {</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="222">
+ <span class="hits">1</span>
+
+ <code class="ruby"> name</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="223">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="224">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="225">
+
+
+ <code class="ruby"> }</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="226">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="227">
+ <span class="hits">1</span>
+
+ <code class="ruby"> validation = subject.validate(query)</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="228">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.valid?).to be_truthy</code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="229">
+ <span class="hits">1</span>
+
+ <code class="ruby"> expect(validation.errors).to be_empty</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="230">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="231">
+
+
+ <code class="ruby"> end</code>
+ </li>
+
+ <li class="never" data-hits="" data-linenumber="232">
+
+
+ <code class="ruby"></code>
+ </li>
+
+ <li class="covered" data-hits="1" data-linenumber="233">
+ <span class="hits">1</span>
+
<code class="ruby"> describe 'directives' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="212">
+ <li class="covered" data-hits="1" data-linenumber="234">
<span class="hits">1</span>
<code class="ruby"> it 'can create a query with a directive and validations should not fail' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="213">
+ <li class="covered" data-hits="1" data-linenumber="235">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="214">
+ <li class="covered" data-hits="1" data-linenumber="236">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="215">
+ <li class="covered" data-hits="1" data-linenumber="237">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="216">
+ <li class="covered" data-hits="1" data-linenumber="238">
<span class="hits">1</span>
<code class="ruby"> name(:@include => { if: true })</code>
</li>
- <li class="never" data-hits="" data-linenumber="217">
+ <li class="never" data-hits="" data-linenumber="239">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="218">
+ <li class="never" data-hits="" data-linenumber="240">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="219">
+ <li class="never" data-hits="" data-linenumber="241">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="220">
+ <li class="never" data-hits="" data-linenumber="242">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="221">
+ <li class="covered" data-hits="1" data-linenumber="243">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="222">
+ <li class="covered" data-hits="1" data-linenumber="244">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_truthy</code>
</li>
- <li class="never" data-hits="" data-linenumber="223">
+ <li class="never" data-hits="" data-linenumber="245">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="224">
+ <li class="never" data-hits="" data-linenumber="246">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="225">
+ <li class="covered" data-hits="1" data-linenumber="247">
<span class="hits">1</span>
<code class="ruby"> it 'unknown directives will fail' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="226">
+ <li class="covered" data-hits="1" data-linenumber="248">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="227">
+ <li class="covered" data-hits="1" data-linenumber="249">
<span class="hits">1</span>
<code class="ruby"> catCollection(:@unknownDirective => nil)</code>
</li>
- <li class="never" data-hits="" data-linenumber="228">
+ <li class="never" data-hits="" data-linenumber="250">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="229">
+ <li class="never" data-hits="" data-linenumber="251">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="230">
+ <li class="covered" data-hits="1" data-linenumber="252">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="231">
+ <li class="covered" data-hits="1" data-linenumber="253">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="232">
+ <li class="covered" data-hits="1" data-linenumber="254">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="233">
+ <li class="covered" data-hits="1" data-linenumber="255">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Directive unknown '@unknownDirective'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="234">
+ <li class="never" data-hits="" data-linenumber="256">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="235">
+ <li class="never" data-hits="" data-linenumber="257">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="236">
+ <li class="covered" data-hits="1" data-linenumber="258">
<span class="hits">1</span>
<code class="ruby"> it 'known directive will fail if no arguments are passed' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="237">
+ <li class="covered" data-hits="1" data-linenumber="259">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="238">
+ <li class="covered" data-hits="1" data-linenumber="260">
<span class="hits">1</span>
<code class="ruby"> catCollection(:@include => nil)</code>
</li>
- <li class="never" data-hits="" data-linenumber="239">
+ <li class="never" data-hits="" data-linenumber="261">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="240">
+ <li class="never" data-hits="" data-linenumber="262">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="241">
+ <li class="covered" data-hits="1" data-linenumber="263">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="242">
+ <li class="covered" data-hits="1" data-linenumber="264">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="243">
+ <li class="covered" data-hits="1" data-linenumber="265">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="244">
+ <li class="covered" data-hits="1" data-linenumber="266">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Missing arguments for directive '@include'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="245">
+ <li class="never" data-hits="" data-linenumber="267">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="246">
+ <li class="never" data-hits="" data-linenumber="268">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="247">
+ <li class="covered" data-hits="1" data-linenumber="269">
<span class="hits">1</span>
<code class="ruby"> it 'known directive will fail if arguments are empty' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="248">
+ <li class="covered" data-hits="1" data-linenumber="270">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="249">
+ <li class="covered" data-hits="1" data-linenumber="271">
<span class="hits">1</span>
<code class="ruby"> catCollection(:@include => {})</code>
</li>
- <li class="never" data-hits="" data-linenumber="250">
+ <li class="never" data-hits="" data-linenumber="272">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="251">
+ <li class="never" data-hits="" data-linenumber="273">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="252">
+ <li class="covered" data-hits="1" data-linenumber="274">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="253">
+ <li class="covered" data-hits="1" data-linenumber="275">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="254">
+ <li class="covered" data-hits="1" data-linenumber="276">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="255">
+ <li class="covered" data-hits="1" data-linenumber="277">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Missing arguments for directive '@include'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="256">
+ <li class="never" data-hits="" data-linenumber="278">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="257">
+ <li class="never" data-hits="" data-linenumber="279">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="258">
+ <li class="covered" data-hits="1" data-linenumber="280">
<span class="hits">1</span>
<code class="ruby"> it 'known directive will fail if arguments is not if' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="259">
+ <li class="covered" data-hits="1" data-linenumber="281">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="260">
+ <li class="covered" data-hits="1" data-linenumber="282">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="261">
+ <li class="covered" data-hits="1" data-linenumber="283">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="262">
+ <li class="covered" data-hits="1" data-linenumber="284">
<span class="hits">1</span>
<code class="ruby"> name(:@include => { else: true })</code>
</li>
- <li class="never" data-hits="" data-linenumber="263">
+ <li class="never" data-hits="" data-linenumber="285">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="264">
+ <li class="never" data-hits="" data-linenumber="286">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="265">
+ <li class="never" data-hits="" data-linenumber="287">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="266">
+ <li class="never" data-hits="" data-linenumber="288">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="267">
+ <li class="covered" data-hits="1" data-linenumber="289">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="268">
+ <li class="covered" data-hits="1" data-linenumber="290">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="269">
+ <li class="covered" data-hits="1" data-linenumber="291">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="270">
+ <li class="covered" data-hits="1" data-linenumber="292">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid argument 'else' for directive '@include'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="271">
+ <li class="never" data-hits="" data-linenumber="293">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="272">
+ <li class="never" data-hits="" data-linenumber="294">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="273">
+ <li class="covered" data-hits="1" data-linenumber="295">
<span class="hits">1</span>
<code class="ruby"> it 'known directive will fail when if value is not boolean' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="274">
+ <li class="covered" data-hits="1" data-linenumber="296">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="275">
+ <li class="covered" data-hits="1" data-linenumber="297">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="276">
+ <li class="covered" data-hits="1" data-linenumber="298">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="277">
+ <li class="covered" data-hits="1" data-linenumber="299">
<span class="hits">1</span>
<code class="ruby"> name(:@include => { if: 123 })</code>
</li>
- <li class="never" data-hits="" data-linenumber="278">
+ <li class="never" data-hits="" data-linenumber="300">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="279">
+ <li class="never" data-hits="" data-linenumber="301">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="280">
+ <li class="never" data-hits="" data-linenumber="302">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="281">
+ <li class="never" data-hits="" data-linenumber="303">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="282">
+ <li class="covered" data-hits="1" data-linenumber="304">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="283">
+ <li class="covered" data-hits="1" data-linenumber="305">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="284">
+ <li class="covered" data-hits="1" data-linenumber="306">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="285">
+ <li class="covered" data-hits="1" data-linenumber="307">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid value for 'if`, must be a boolean")</code>
</li>
- <li class="never" data-hits="" data-linenumber="286">
+ <li class="never" data-hits="" data-linenumber="308">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="287">
+ <li class="never" data-hits="" data-linenumber="309">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="288">
+ <li class="covered" data-hits="1" data-linenumber="310">
<span class="hits">1</span>
<code class="ruby"> it 'known directive will fail when multiple arguments are passed' do</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="289">
+ <li class="covered" data-hits="1" data-linenumber="311">
<span class="hits">1</span>
<code class="ruby"> query = dsl.query {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="290">
+ <li class="covered" data-hits="1" data-linenumber="312">
<span class="hits">1</span>
<code class="ruby"> catCollection {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="291">
+ <li class="covered" data-hits="1" data-linenumber="313">
<span class="hits">1</span>
<code class="ruby"> items {</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="292">
+ <li class="covered" data-hits="1" data-linenumber="314">
<span class="hits">1</span>
<code class="ruby"> name(:@include => { if: true, else: false })</code>
</li>
- <li class="never" data-hits="" data-linenumber="293">
+ <li class="never" data-hits="" data-linenumber="315">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="294">
+ <li class="never" data-hits="" data-linenumber="316">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="295">
+ <li class="never" data-hits="" data-linenumber="317">
<code class="ruby"> }</code>
</li>
- <li class="never" data-hits="" data-linenumber="296">
+ <li class="never" data-hits="" data-linenumber="318">
<code class="ruby"></code>
</li>
- <li class="covered" data-hits="1" data-linenumber="297">
+ <li class="covered" data-hits="1" data-linenumber="319">
<span class="hits">1</span>
<code class="ruby"> validation = subject.validate(query)</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="298">
+ <li class="covered" data-hits="1" data-linenumber="320">
<span class="hits">1</span>
<code class="ruby"> expect(validation.valid?).to be_falsey</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="299">
+ <li class="covered" data-hits="1" data-linenumber="321">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors).not_to be_empty</code>
</li>
- <li class="covered" data-hits="1" data-linenumber="300">
+ <li class="covered" data-hits="1" data-linenumber="322">
<span class="hits">1</span>
<code class="ruby"> expect(validation.errors.map(&:to_s)).to include("Invalid argument 'else' for directive '@include'")</code>
</li>
- <li class="never" data-hits="" data-linenumber="301">
+ <li class="never" data-hits="" data-linenumber="323">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="302">
+ <li class="never" data-hits="" data-linenumber="324">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="303">
+ <li class="never" data-hits="" data-linenumber="325">
<code class="ruby"> end</code>
</li>
- <li class="never" data-hits="" data-linenumber="304">
+ <li class="never" data-hits="" data-linenumber="326">
<code class="ruby">end</code>
</li>