<commit_before>require 'rails_helper'

RSpec.describe KitchensController, :type => :controller do

end<commit_msg>wrote test for Kitchen_controller#delete; passing<commit_after>require 'rails_helper'

RSpec.describe KitchensController, :type => :controller do

  let(:valid_attributes) do
    FactoryGirl.attributes_for(:kitchen)
  end

  describe "DELETE destroy" do
    let!(:kitchen) { FactoryGirl.create(:kitchen_with_user) }

    context "the user created the requested kitchen" do
      it "change the data_status of kitchen to archive" do
        expect {
          delete :destroy, { :id => kitchen.id }, { :user_id => kitchen.user.id }
        }.to change{ kitchen.reload.data_status }.to("archive")
      end

      it "does not remove the kitchen record from database" do
        expect {
          delete :destroy, { :id => kitchen.id }, { :user_id => kitchen.user.id }
        }.to_not change(Kitchen, :count)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.0, 'mean_word_length': 3.3031674208144794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '404076', 'n_tokens_mistral': 288, 'n_tokens_neox': 274, 'n_words': 81}