<commit_before>require 'spec_helper'

describe AccountingAdjustment do
  context '#adjust_stock(inventory, qty_to_add, return_amount)' do
    it "should update count on hand" do
      inventory = FactoryGirl.create(:inventory, :count_on_hand => 30000)
      AccountingAdjustment.adjust_stock(inventory, 1000, 12.00)
      inventory.reload
      expect(inventory.count_on_hand).to eq 31000
    end
  end
end
<commit_msg>fix test<commit_after>require 'spec_helper'

describe AccountingAdjustment do
  context '#adjust_stock(inventory, qty_to_add, return_amount)' do
    let(:inventory) { FactoryGirl.create(:inventory, :count_on_hand => 30000) }
    let!(:variant)   { FactoryGirl.create(:variant,   :inventory => inventory) }

    it "should update count on hand" do
      AccountingAdjustment.adjust_stock(inventory, 1000, 12.00)
      inventory.reload
      expect(inventory.count_on_hand).to eq 31000
    end
  end
end

{'fraction_non_alphanumeric': 0.09337676438653637, 'fraction_numerical': 0.03908794788273615, 'mean_word_length': 4.423529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1776316', 'n_tokens_mistral': 325, 'n_tokens_neox': 291, 'n_words': 67}