<commit_before>require 'spec_helper'

describe Api::ProductsController do
  describe '#info' do
    let!(:user) { User.make! }
    let!(:product) { Product.make!(slug: 'roachface-killah') }

    before do
      product.core_team << user
    end

    it "gets a product's information" do
      get :info,
        product_id: 'roachface-killah',
        format: :json

      body = JSON.parse(response.body)
      expect(body["name"]).to eq(product.name)
      expect(body["core_team"][0]["username"]).to eq(user.username)
      expect(body["core_team"][0]["avatar_url"]).to eq(user.avatar_url)
    end
  end
end<commit_msg>Fix failing test<commit_after>require 'spec_helper'

describe Api::ProductsController do
  describe '#info' do
    let!(:user) { User.make! }
    let!(:product) { Product.make!(slug: 'roachface-killah') }

    before do
      product.core_team << user
    end

    it "gets a product's information" do
      get :info,
        product_id: 'roachface-killah',
        format: :json

      body = JSON.parse(response.body)
      expect(body["name"]).to eq(product.name)
      expect(body["core_team"][0]["username"]).to eq(user.username)
      expect(body["core_team"][0]["avatar_url"]).to eq(user.avatar.url.to_s)
    end
  end
end
{'fraction_non_alphanumeric': 0.15175718849840256, 'fraction_numerical': 0.003194888178913738, 'mean_word_length': 3.3058419243986252, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7143258', 'n_tokens_mistral': 435, 'n_tokens_neox': 426, 'n_words': 83}