Skip to content

Commit

Permalink
Created a failing spec for marking Task complete where bucket = "spec…
Browse files Browse the repository at this point in the history
…ific_time".
  • Loading branch information
Drew Neil committed Sep 16, 2009
1 parent fcf5003 commit 3dbe523
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/controllers/tasks_controller_spec.rb
Expand Up @@ -404,6 +404,16 @@ def produce_tasks(user, view)
response.should render_template("tasks/complete")
end

it "should change task status, expose task as @task, and render [complete] template where task.bucket = 'specific_time'" do
@task = Factory(:task, :completed_at => nil, :user => @current_user, :bucket => "specific_time")

xhr :put, :complete, :id => @task.id
@task.reload.completed_at.should_not == nil
assigns[:task].should == @task
assigns[:task_total].should == nil
response.should render_template("tasks/complete")
end

it "should change update tasks sidebar if bucket is not empty" do
@task = Factory(:task, :completed_at => nil, :user => @current_user)

Expand Down

0 comments on commit 3dbe523

Please sign in to comment.