Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into bug/MSP-12700/workspace-oom
Browse files Browse the repository at this point in the history
* Bumping version after recent release
  • Loading branch information
shuckins-r7 committed Jun 12, 2015
2 parents 82e6a0f + 540fc05 commit 6fc2d7c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/models/mdm/module/detail.rb
Expand Up @@ -71,7 +71,6 @@ class Mdm::Module::Detail < ActiveRecord::Base
# @return [ActiveRecord::Relation<MetasploitDataModels::AutomaticExploitation::Match>]
has_many :matches,
:class_name => 'MetasploitDataModels::AutomaticExploitation::Match',
:dependent => :destroy,
:primary_key => :fullname,
:foreign_key => :module_fullname,
:inverse_of => :module_detail
Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit_data_models/version.rb
Expand Up @@ -10,7 +10,7 @@ module Version
# The minor version number, scoped to the {MAJOR} version number.
MINOR = 2
# The patch version number, scoped to the {MAJOR} and {MINOR} version numbers.
PATCH = 2
PATCH = 3
# The prerelease version, scoped to the {PATCH} version number.
PRERELEASE = 'workspace-oom'

Expand Down
Expand Up @@ -8,7 +8,7 @@

subject(:automatic_exploitation_match){ described_class.new }

before(:each ) do
before(:each) do
automatic_exploitation_match.matchable = vuln
automatic_exploitation_match.module_fullname = module_detail.fullname
automatic_exploitation_match.save!
Expand All @@ -17,7 +17,21 @@
it 'should point to the Mdm::Module::Detail with a fullname corresponding to #module_fullname' do
expect(automatic_exploitation_match.module_detail).to eq(module_detail)
end
end

describe "deleting the associated Mdm::Module::Detail" do
subject(:automatic_exploitation_match){ FactoryGirl.create(:automatic_exploitation_match) }
let(:match_id){ automatic_exploitation_match.id }

before(:each) do
automatic_exploitation_match.module_detail.destroy
end

it 'should still exist in the DB' do
the_match = MetasploitDataModels::AutomaticExploitation::Match.find(match_id)
expect(the_match).to_not be_blank
end
end

end
end
Expand Up @@ -2,5 +2,6 @@
factory :automatic_exploitation_match, :class => MetasploitDataModels::AutomaticExploitation::Match do
association :module_detail, factory: :mdm_module_detail
association :match_set, factory: :automatic_exploitation_match_set
association :matchable, factory: :mdm_vuln
end
end

0 comments on commit 6fc2d7c

Please sign in to comment.