mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
all non-cucumber tests are passing
This commit is contained in:
parent
13b58f3a10
commit
63175c115b
46 changed files with 248 additions and 505 deletions
21
backup.rails2.3/spec/controllers/projects_controller_spec.rb
Normal file
21
backup.rails2.3/spec/controllers/projects_controller_spec.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
|
||||
describe ProjectsController do
|
||||
it "should save default tags" do
|
||||
project = Project.new
|
||||
|
||||
projects = mock(:project_list, :build => project,
|
||||
:active => mock(:meh, :count => 0), :size => 0)
|
||||
|
||||
user = mock_model(User, :projects => projects, :prefs => mock(:locale => :en),
|
||||
:contexts => mock(:context_list, :find => []))
|
||||
controller.stub!(:current_user).and_return(user)
|
||||
controller.stub!(:login_required).and_return(true)
|
||||
controller.stub!(:set_time_zone).and_return(true)
|
||||
controller.stub!(:mobile?).and_return(true)
|
||||
|
||||
get 'create', :project => {:name => "fooproject", :default_tags => "a,b"}
|
||||
|
||||
project.default_tags.should == 'a,b'
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue