code class="ruby">  end</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="19">
            
            

            

            <code class="ruby"></code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="20">
            <span class="hits">1</span>
            

            

            <code class="ruby">  context &#39;with unsuccessful call due to parameter validations failure&#39; do</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="3" data-linenumber="21">
            <span class="hits">3</span>
            

            

            <code class="ruby">    before { post &#39;/restaurants&#39;, params: { name: &#39;test_name&#39;} }</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="22">
            
            

            

            <code class="ruby">    # Test Header</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="23">
            <span class="hits">1</span>
            

            

            <code class="ruby">    it &#39;returns a 422 status&#39; do</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="24">
            <span class="hits">1</span>
            

            

            <code class="ruby">      expect(response).to have_http_status(:unprocessable_entity)</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="25">
            
            

            

            <code class="ruby">    end</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="26">
            
            

            

            <code class="ruby">    # Test Body</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="27">
            <span class="hits">1</span>
            

            

            <code class="ruby">    it &#39;returns correct error message&#39; do</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="28">
            <span class="hits">1</span>
            

            

            <code class="ruby">      expect(JSON.parse(response.body)[&#39;message&#39;]).to eq(&quot;Validation failed: Kind can&#39;t be blank, Description can&#39;t be blank, Review can&#39;t be blank&quot;)</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="29">
            
            

            

            <code class="ruby">    end</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="30">
            
            

            

            <code class="ruby">  end</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="31">
            
            

            

            <code class="ruby">end</code>
          </li>
        </div>
      
    </ol>
  </pre>
</div>

      
        <div class="source_table" id="b951e2e707a8b7cb0e81ef793ce55aa76df20412">
  <div class="header">
    <h3>spec/requests/post_shop_spec.rb</h3>
    <h4>
      <span class="green">
  100.0%
</span>

      lines covered
    </h4>

    

    <div class="t-line-summary">
      <b>17</b> relevant lines.
      <span class="green"><b>17</b> lines covered</span> and
      <span class="red"><b>0</b> lines missed.</span>
    </div>

    

  </div>

  <pre>
    <ol>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="1">
            <span class="hits">1</span>
            

            

            <code class="ruby">require &#39;rails_helper&#39;</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="2">
            
            

            

            <code class="ruby"></code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="3">
            <span class="hits">1</span>
            

            

            <code class="ruby">describe &#39;ShopsController#create&#39;, type: :request do</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="4">
            
            

            

            <code class="ruby"></code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="5">
            <span class="hits">1</span>
            

            

            <code class="ruby">  context &#39;with successful call&#39; do</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="3" data-linenumber="6">
            <span class="hits">3</span>
            

            

            <code class="ruby">    before { post &#39;/shops&#39;, params: { name: &#39;test name&#39;, industry: &#39;test industry&#39;, logo_url: &#39;test logo_url&#39;, slogan: &#39;test slogan&#39; } }</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="7">
            
            

            

            <code class="ruby">    # Test Header</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="8">
            <span class="hits">1</span>
            

            

            <code class="ruby">    it &#39;returns a created status&#39; do</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="9">
            <span class="hits">1</span>
            

            

            <code class="ruby">      expect(response).to have_http_status(:created)</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="10">
            
            

            

            <code class="ruby">    end</code>
          </li>
        </div>
      
        <div>
          <li class="never" data-hits="" data-linenumber="11">
            
            

            

            <code class="ruby">    # Test Body</code>
          </li>
        </div>
      
        <div>
          <li class="covered" data-hits="1" data-linenumber="12">
            <span class="hits">1</span>
            

            

            <code class="ruby">    it