<commit_before>require 'rails_helper'

describe TeamsController do

    describe "POST #create" do
    context "with an assignment team" do
      it "increases count by 1" do	
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)
      end

      it "redirects to the list page" do
      end
    end
    
    context "with a course team" do
      it "increases the count by 1" do
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)
      end

    end


    context "with an assignment team " do
      it "deletes an assignment team" do
        @assignment = create(:assignment)
        @a_team = create(:assignment_team)

        expect{ @a_team.delete }.to change(Team, :count).by(-1)
      end
    end

    

  end
end
<commit_msg>Added test for delete method<commit_after>require 'rails_helper'

describe TeamsController do

    describe "POST #create" do
    context "with an assignment team" do
      it "increases count by 1" do	
        expect{create :assignment_team, assignment: @assignment}.to change(Team,:count).by(1)
      end

      it "redirects to the list page" do
      end
    end
    
    context "with a course team" do
      it "increases the count by 1" do
        expect{create :course_team, course: @course}.to change(Team,:count).by(1)
      end

    end


    context "with an assignment team " do
      it "deletes an assignment team" do
        @assignment = create(:assignment)
        @a_team = create(:assignment_team)

        expect{ @a_team.delete }.to change(Team, :count).by(-1)
      end
    end

    context "with a course team " do
      it "deletes a course team" do
        @course = create(:course)
        @c_team = create(:course_team)

        expect{ @c_team.delete }.to change(Team, :count).by(-1)
      end
    end
    

  end
end

{'fraction_non_alphanumeric': 0.09351351351351352, 'fraction_numerical': 0.005945945945945946, 'mean_word_length': 2.4277777777777776, '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': '4542758', 'n_tokens_mistral': 596, 'n_tokens_neox': 561, 'n_words': 189}