Anonymous avatar Anonymous committed 298ec8a

Implemented the "Not Implemented Yet" message for when the control panel
is displayed.

Comments (0)

Files changed (2)

lib/SVN/RaWeb/Light.pm

     {
         return $self->process_help();
     }
+    if ($cgi->param("panel"))
+    {
+        print $cgi->header();
+        print <<"EOF";
+<html><body><h1>Not Implemented Yet</h1>
+<p>Sorry but the control panel is not implemented yet.</p>
+</body>
+</html>
+EOF
+        return 0;
+    }
+    
     $self->calc_rev_num();
     $self->calc_path();
 
 use warnings;
 use strict;
 
-use Test::More tests => 37;
+use Test::More tests => 39;
 
 # We need to load the mocking modules first because they fill the 
 # namespaces and %INC. Otherwise, "use CGI" and "use SVN::*" will cause
         "Check for a valid help screen - h1");
 }
 
+# Check for the panel parameter displaying an error notice - temporarily 
+# until it's implemented.
+{
+    local @CGI::new_params = 
+    (
+        'path_info' => "/",
+        'params' =>
+        {
+            'panel' => "1",
+        },
+        'query_string' => "panel=1",
+    );
+
+    local @SVN::Ra::new_params =
+    (
+        'get_latest_revnum' => sub {
+            die "Called get_latest_revnum and shouldn't";
+        },
+        'check_path' => sub {
+            die "Called check_path and shouldn't";
+        },
+        'get_dir' => sub {
+            die "Called get_dir and shouldn't";
+        },
+    );
+
+    reset_out_buffer();
+
+    my $svn_ra_web =
+        SVN::RaWeb::Light->new(
+            'url' => "http://svn-i.shlomifish.org/svn/myrepos/",
+        );
+
+    eval {
+    $svn_ra_web->run();
+    };
+
+    # TEST
+    ok(!$@, "Testing that no exception was thrown.");
+    
+    my $results = get_out_buffer();
+
+    # TEST
+    is ($results, <<"EOF",
+Content-Type: text/html
+
+<html><body><h1>Not Implemented Yet</h1>
+<p>Sorry but the control panel is not implemented yet.</p>
+</body>
+</html>
+EOF
+        "Temporary check for control panel not-impl yet msg.");
+}
+
 1;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.