Permalink
Browse files

Mark some things as TODO based on coverage metric

  • Loading branch information...
1 parent fc91d0a commit 6fd1be4bb5d7eeeb257b66cdc142e943ab92dc00 @mike-burns mike-burns committed Nov 14, 2010
@@ -2,6 +2,7 @@ class MessagesController < ApplicationController
def index
# This is when we send messages to user
if relay?
+ ### TODO: untested
json = Message.json_for_relay(params[:session][:parameters])
render :json => json
@@ -49,6 +49,7 @@ def for(user)
if first_user_id == user.id
second_user
elsif second_user_id == user.id
+ ### TODO: untested
first_user
end
end
@@ -59,6 +60,7 @@ def unschedule!
self.save!
end
+ ### TODO: Use this when the user asks for a new date
def cancel!
self.state = "cancelled"
self.save!
@@ -80,10 +82,12 @@ def scheduled?
state == "scheduled"
end
+ ### TODO: unused?
def unscheduled?
state == "unscheduled"
end
+ ### TODO: unused?
def proposed?
state == "proposed"
end
@@ -32,6 +32,7 @@ def self.deliver(to, message, deliver_in_development = false)
QUEUE.enqueue(MessageSender, "#{TROPO_URL}/sessions?#{param_string}")
end
+ ### TODO: unused?
def self.json_for_relay(message_params)
to = message_params[:to]
message = message_params[:message]
@@ -142,6 +143,7 @@ def self.handle_retry(user)
handle_new_date(user)
end
else
+ ### TODO: untested
outside_dating_hours(user)
end
end
@@ -5,6 +5,7 @@ def self.perform(args_hash)
meetup_id = args_hash["meetup_id"]
if ! Meetup.exists?(meetup_id)
+ ### TODO: untested
raise "MorningAfterCheckerUpper ran for meetup_id #{args_hash["meetup_id"]} but could not find that meetup"
end
View
@@ -49,14 +49,19 @@ def self.looking_for_sort_of_like(user)
end
+ # Produce only the users who identify as at least male. Currently unused but
+ # interesting from irb. TODO: Use from a stats page.
def self.men
where('users.male')
end
+ # Produce only the users who identify as at least female. TODO: Use from a stats page.
def self.women
where('users.female')
end
+ # Produce only the users who identify as at least non-male, non-female.
+ # Currently unused but interesting from irb. TODO: Use from a stats page.
def self.other
where('users.other')
end
@@ -41,10 +41,6 @@
fill_in 'user[name]', :with => name
end
-When 'I fill in my description as "$description"' do |description|
- fill_in 'user[description]', :with => description
-end
-
When 'I check my gender as male' do
check 'user[male]'
end
@@ -1,7 +1,3 @@
-Then 'I see a description of how to use the Web site' do
- page.should have_content('you want a date')
-end
-
Then 'I see a welcome page' do
page.should have_content('text these commands')
end
@@ -17,10 +17,6 @@ def self.all
@@responses
end
- def self.last
- @@responses.last
- end
-
def self.has_text?(phone, message)
@@responses.any? do |r|
r["to"] == phone && r["message"] == message

0 comments on commit 6fd1be4

Please sign in to comment.