Sha256: 043f9af0460593d53bdea62caf31ecba2e792cc5e5f1ef50cb82036e278eac7b

Contents?: true

Size: 574 Bytes

Versions: 5

Compression:

Stored size: 574 Bytes

Contents

require 'spec_helper'

describe Mdm::TaskHost do
  context "Associations" do
    it { should belong_to(:task).class_name('Mdm::Task') }
    it { should belong_to(:host).class_name('Mdm::Host') }
  end

  context "validations" do
    it "should not allow duplicate associations" do
      task = FactoryGirl.build(:mdm_task)
      host = FactoryGirl.build(:mdm_host)
      FactoryGirl.create(:mdm_task_host, :task => task, :host => host)
      task_host2 = FactoryGirl.build(:mdm_task_host, :task => task, :host => host)
      task_host2.should_not be_valid
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
metasploit_data_models-0.15.2-java spec/app/models/mdm/task_host_spec.rb
metasploit_data_models-0.15.2 spec/app/models/mdm/task_host_spec.rb
metasploit_data_models-0.15.1-java spec/app/models/mdm/task_host_spec.rb
metasploit_data_models-0.15.1 spec/app/models/mdm/task_host_spec.rb
metasploit_data_models-0.15.0 spec/app/models/mdm/task_host_spec.rb