Permalink
Browse files

Merge branch 'master' of git@github.com:railsrumble/giant-robots

  • Loading branch information...
2 parents 8c9dfd8 + c5a5542 commit ec3c5c9969dab04d87b52aa002794cb4ab989a5c @mike-burns mike-burns committed Oct 19, 2008
@@ -15,6 +15,7 @@
<div id="header">
<h1 id="logo"><%= link_to %{<span class="invisible">Where's the Milk at?</span>}, root_url %></h1>
+ <p id="hello">Hey there, <%= user_name %></p>
<div id="menu">
<ul>
<li id="purchases-index" ><%= link_to 'Purchases', purchases_path %></li>
@@ -1,7 +1,10 @@
<div id="account-changes">
<div class="signup-map" id="map" style="width: 475px; height: 169px;"></div>
- <% form_tag openid_path, :id => "openid_form" do %>
+ <% form_tag openid_path,
+ :id => "openid_form",
+ :style => "display: #{params[:user_type] == 'human' ? 'none' : 'block'};" do %>
+ <%= hidden_field_tag 'user_type', 'openid' %>
<div class="text_field">
<label for="openid_identifier">
Open ID <%= link_to_function "Login like a Human", "$('openid_form').hide(); $('new_user').show();" %>
@@ -18,7 +21,9 @@
</p>
<% end %>
- <% form_for @user, :html => { :style => "display: none;" } do |form| %>
+ <% form_for @user,
+ :html => { :style => "display: #{params[:user_type] == 'human' ? 'block' : 'none'};" } do |form| %>
+ <%= hidden_field_tag 'user_type', 'human' %>
<%= form.error_messages %>
<div class="text_field">
<label for="user_email">
@@ -16,3 +16,5 @@
# Disable delivery errors, bad email addresses will be ignored
config.action_mailer.raise_delivery_errors = false
+
+HOST = "wheresthemilkat.r08.railsrumble.com"
@@ -1,7 +1 @@
-ActionMailer::Base.smtp_settings = {
- :address => "smtp.thoughtbot.com",
- :port => 25,
- :domain => "thoughtbot.com"
-}
-
-DO_NOT_REPLY = "donotreply@wheresthemilk.at"
+DO_NOT_REPLY = "donotreply@wheresthemilkat.r08.railsrumble.com"
@@ -1,3 +1,3 @@
HoptoadNotifier.configure do |config|
- config.api_key = 'HOPTOAD-KEY'
+ config.api_key = 'b61f9924295cd6f481cef3696870e536'
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -78,7 +78,7 @@ h1 {
padding-top: 14px;
padding-left: 30px;
width: 93px;
- height: 10px;
+ height: 6px;
padding-bottom: 12px;
background: #57999d 0 0;
margin: 0;
@@ -1073,3 +1073,10 @@ h2#login {
body.stores #map {
margin-top: 10px;
}
+
+#hello {
+ float: right;
+ margin-top: 17px;
+ margin-right: 200px;
+ color: #91cfd3;
+}
@@ -15,6 +15,34 @@ class UsersControllerTest < ActionController::TestCase
should_have_map_observer map
end
end
+
+ context "POST to create as a human" do
+ setup do
+ post :create, :user_type => 'human'
+ end
+
+ should "display the human form" do
+ assert_select '#new_user[style="display: block;"]'
+ end
+
+ should "hide the openid form" do
+ assert_select '#openid_form[style="display: none;"]'
+ end
+ end
+
+ context "POST to create using openid" do
+ setup do
+ post :create, :user_type => 'openid'
+ end
+
+ should "hide the human form" do
+ assert_select '#new_user[style="display: none;"]'
+ end
+
+ should "display the openid form" do
+ assert_select '#openid_form[style="display: block;"]'
+ end
+ end
public_context do
context "with a user" do

0 comments on commit ec3c5c9

Please sign in to comment.