Skip to content

26 Create a Task, Scenario: Passing priority and status, Scenario: Invalid status #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: 2.0
Choose a base branch
from

Conversation

cored
Copy link
Contributor

@cored cored commented Aug 10, 2012

No description provided.

cored added 7 commits August 10, 2012 08:09
…rio: Invalid priority, Scenario: Invalid status

* Add pending specs for the feature
* Add spec for testing creation of task with status and priority
* Refactor: Move example of validation of status and priority
* Add initial implementation for validating status
* Add valid values for task status field
* Refactor: Move validate_inclusion_of to entity
@orodriguez
Copy link
Contributor

I see you modify every spec to add status and priority field in task creation. I suggest to create a new context in create task spec to handle the scenario when this values are passed. For the old spec just ask if they have the default value, example:

t = project.task :title => 'foo', :requestor => 'bar'
t.status.should == :open
t.priority.should == 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants