### Eclipse Workspace Patch 1.0
#P Drupal-7-HEAD
Index: modules/path/path.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.test,v
retrieving revision 1.40
diff -u -r1.40 path.test
--- modules/path/path.test	5 Aug 2010 23:53:38 -0000	1.40
+++ modules/path/path.test	19 Oct 2010 06:45:37 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: path.test,v 1.40 2010/08/05 23:53:38 webchick Exp $
+// $Id: path.test,v 1.41 2010/10/09 17:38:41 webchick Exp $
 
 /**
  * @file
@@ -141,6 +141,22 @@
     $this->assertNoText($node1->title, 'Previous alias no longer works.');
     $this->assertResponse(404);
 
+    // Change the path alias, preview and then save the node.
+    $previous = $edit['path[alias]'];
+    $this->drupalPost('node/' . $node1->nid . '/edit', $edit, t('Preview'));
+    $edit['path[alias]'] = $this->randomName(8);
+    $this->drupalPost(NULL, $edit, t('Preview'));
+    $this->drupalPost(NULL, $edit, t('Save'));
+
+    // Confirm that the new alias works.
+    $this->drupalGet($edit['path[alias]']);
+    $this->assertText($node1->title, 'New alias works after previewing and saving the node.');
+
+    // Make sure that previous alias no longer works.
+    $this->drupalGet($previous);
+    $this->assertNoText($node1->title, 'Old alias no longer works after previewing and saving the node.');
+    $this->assertResponse(404);
+
     // Create second test node.
     $node2 = $this->drupalCreateNode();
 
@@ -299,6 +315,7 @@
 
     // Confirm that the alias is returned by url().
     drupal_static_reset('language_list');
+    drupal_static_reset('locale_url_outbound_alter');
     $languages = language_list();
     $url = url('node/' . $french_node->nid, array('language' => $languages[$french_node->language]));
     $this->assertTrue(strpos($url, $edit['path[alias]']), t('URL contains the path alias.'));
