Skip to content

Instantly share code, notes, and snippets.

@Aviio
Created April 10, 2016 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aviio/c795901a805c8123746ce9a72d85c3d4 to your computer and use it in GitHub Desktop.
Save Aviio/c795901a805c8123746ce9a72d85c3d4 to your computer and use it in GitHub Desktop.
def test_when_given_one_vulnerable_plugin_with_name_returns_correct_vulnerable_plugin
#arrange
vulnerable_plugin = VulnerablePlugin.new
vulnerable_plugin.name = 'wp-hb-audio-gallery'
vulnerable_plugins = []
vulnerable_plugins << vulnerable_plugin
#act
result = @sut.process_vulnerable_plugins(vulnerable_plugins)
#assert
assert_equal(result.count, 1, failure_message = "Returned #{result.count} plugins instead of 1 plugin.")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment