Detection of the wp-content directory improved

This commit is contained in:
Erwan
2012-09-12 17:11:21 +02:00
parent 397ee2d2be
commit 07a60071bd
3 changed files with 16 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="http://wordpress-3.4.1/wp-content/plugins/wp-turbo/turbo.css" media="screen" />
<title>Hello</title>
</head>
<body />
</html>

View File

@@ -121,6 +121,12 @@ describe WpTarget do
@expected = "wp-content"
end
it "should find the location even if the src or href goes in the plugins dir" do
@target_url = "http://wordpress-3.4.1-in-plugins.htm"
@fixture = fixtures_dir + "/wordpress-3.4.1-in-plugins.htm"
@expected = "wp-content"
end
end
describe "#wp_plugins_dir" do