<commit_before>require 'spec_helper'

describe Rdb::BoardsController, type: :controller do
  let(:board) do
    RdbBoard.create! name: 'My Board', engine: Rdb::Taskboard
  end

  describe 'GET show' do
    subject { get :show, id: board.id, format: 'json' }

    it { expect(subject.status).to eq 200 }

    describe 'JSON body' do
      subject { JSON.load(super().body).symbolize_keys }

      it { should eq id: board.id, name: 'My Board' }
    end
  end
end<commit_msg>Fix test stubs for API boards controller<commit_after>require 'spec_helper'

describe Rdb::BoardsController, type: :controller do
  let(:board) do
    RdbBoard.create! name: 'My Board', engine: Rdb::Taskboard
  end

  describe 'GET show' do
    subject { get :show, id: board.id, format: 'json' }

    it { expect(subject.status).to eq 200 }

    describe 'JSON body' do
      subject { JSON.load super().body }

      it { expect(subject.keys).to eq %w(id name engine) }
      it { expect(subject['id']).to eq board.id }
      it { expect(subject['name']).to eq board.name }
    end
  end
end
{'fraction_non_alphanumeric': 0.1275797373358349, 'fraction_numerical': 0.005628517823639775, 'mean_word_length': 3.268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '6099419', 'n_tokens_mistral': 361, 'n_tokens_neox': 344, 'n_words': 108}