Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Another run_html offering test

  • Loading branch information...
commit 89b67ab3b296605f0553267451f981e6fca35358 1 parent 4e5df1c
@psndcsrv psndcsrv authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 spec/controllers/portal/offerings_controller_spec.rb
View
7 spec/controllers/portal/offerings_controller_spec.rb
@@ -85,7 +85,6 @@
it 'should render an html form' do
get :show, :id => @offering.id, :format => 'run_html'
-
form_regex = /<form.*?action='\/portal\/offerings\/(\d+)\/answers'/
response.body.should =~ form_regex
response.body =~ form_regex
@@ -129,5 +128,11 @@
mc_saveables.size.should == (mc_saveables_size + 1)
mc_saveables.last.answer.should == choice.choice
end
+
+ it 'should disable the submit button when there is no learner' do
+ controller.stub!(:setup_portal_student).and_return(nil)
+ get :show, :id => @offering.id, :format => 'run_html'
+ response.body.should =~ /<input.*class='disabled'.*type='submit'/
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.