<commit_before>describe MiqAeToolsController do
  before(:each) do
    stub_user(:features => :all)
  end

  context "#form_field_changed" do
    it "resets target id to nil, when target class is <none>" do
      new = {<commit_msg>MiqAeTools#form_field_changed spec - reintroduce test for target_class=''<commit_after>describe MiqAeToolsController do
  before(:each) do
    stub_user(:features => :all)
  end

  context "#form_field_changed" do
    it "resets target id to nil, when target class is <none>" do
      new = {
        :target_class => "EmsCluster",
        :target_id    => 1
      }
      controller.instance_variable_set(:@resolve, :throw_ready => true, :new => new)
      expect(controller).to receive(:render)
      controller.instance_variable_set(:@_params, :target_class => '', :id => 'new')
      controller.send(:form_field_changed)
      expect(assigns(:resolve)[:new][:target_class]).to eq('')
      expect(assigns(:resolve)[:new][:target_id]).to eq(nil)
    end

    it "resets target id to nil, when target class is Vm" do
      new = {
{'fraction_non_alphanumeric': 0.12593984962406016, 'fraction_numerical': 0.0009398496240601503, 'mean_word_length': 3.6710526315789473, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4901173', 'n_tokens_mistral': 342, 'n_tokens_neox': 336, 'n_words': 87}