<commit_before>require 'spec_helper'

describe Api::StanzaController do
  describe 'GET show' do
    before do
      get :show, id: 'protein_names_and_origin', tax_id: '1111708', gene_id: 'slr1311'
    end

    it { response.should be_success }

    it { response.body.should be_json_eql(<<-JSON.strip_heredoc) }
      {
        "css_uri": "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.min.css",
        "genes": [
          {
            "gene_name": "psbA3",
            "locus_name": "sll1867",
            "synonyms_name": "psbA-3"
          },
          {
            "gene_name": "psbA2",
            "locus_name": "slr1311",
            "synonyms_name": "psbA-2"
          }
        ],
        "summary": {
          "alternative_names": [
            "Photosystem II protein D1 2",
            "32 kDa thylakoid membrane protein 2"
          ],
          "ec_name": "1.10.3.9",
          "organism_name": "Synechocystis sp. (strain PCC 6803 / Kazusa)",
          "parent_taxonomy_names": [
            "cellular organisms",
            "Bacteria",
            "Cyanobacteria",
            "Chroococcales",
            "Synechocystis",
            "Synechocystis sp. PCC 6803",
            "Synechocystis sp. (strain PCC 6803 / Kazusa)"
          ],
          "recommended_name": "Photosystem Q(B) protein 2",
          "taxonomy_id": "1111708"
        }
      }
    JSON
  end
end<commit_msg>fix spec<commit_after>require 'spec_helper'

describe Api::StanzaController do
  describe 'GET show' do
    before do
      get :show, id: 'protein_names_and_origin', tax_id: '1111708', gene_id: 'slr1311'
    end

    it { response.should be_success }

    it { response.body.should be_json_eql(<<-JSON.strip_heredoc) }
      {
        "css_uri": "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.min.css",
        "genes": [
          {
            "gene_name": "psbA2",
            "synonyms_name": "psbA-2",
            "locus_name": "slr1311"
          },
          {
            "gene_name": "psbA3",
            "synonyms_name": "psbA-3",
            "locus_name": "sll1867"
          }
        ],
        "summary": {
          "alternative_names": [
            "32 kDa thylakoid membrane protein 2",
            "Photosystem II protein D1 2"
          ],
          "ec_name": "1.10.3.9",
          "organism_name": "Synechocystis sp. (strain PCC 6803 / Kazusa)",
          "parent_taxonomy_names": [
            "cellular organisms",
            "Oscillatoriophycideae",
            "Cyanobacteria",
            "Synechocystis",
            "Chroococcales",
            "Bacteria",
            "Synechocystis sp. PCC 6803"
          ],
          "recommended_name": "Photosystem Q(B) protein 2",
          "taxonomy_id": "1111708"
        }
      }
    JSON
  end
end
{'fraction_non_alphanumeric': 0.12889518413597734, 'fraction_numerical': 0.03824362606232295, 'mean_word_length': 1.7111324376199617, 'pattern_counts': {'":': 30, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '126028', 'n_tokens_mistral': 1051, 'n_tokens_neox': 939, 'n_words': 175}