/spec/lib/rex/exploitation/js/network_spec.rb

https://github.com/debbiemezyene/metasploit-framework · Ruby · 23 lines · 17 code · 6 blank · 0 comment · 0 complexity · a31d91bc65a855871f8be3dcb44c9287 MD5 · raw file

  1. require 'rex/exploitation/js'
  2. describe Rex::Exploitation::Js::Network do
  3. context "Class methods" do
  4. context ".ajax_download" do
  5. it "should load the ajax_download javascript" do
  6. js = Rex::Exploitation::Js::Network.ajax_download
  7. js.should =~ /function ajax_download/
  8. end
  9. end
  10. context ".ajax_post" do
  11. it "should load the postInfo javascript" do
  12. js = Rex::Exploitation::Js::Network.ajax_post
  13. js.should =~ /function postInfo/
  14. end
  15. end
  16. end
  17. end