Permalink
Browse files

fix workitem pagination spec

  • Loading branch information...
1 parent 8adee7b commit 3f7d2c8f8dd589222d5966bdbdfec142e78e1b2e @jmettraux jmettraux committed Mar 8, 2012
Showing with 2 additions and 10 deletions.
  1. +2 −10 spec/resources/workitems_spec.rb
@@ -12,11 +12,8 @@
end
def workitem_count(from, to, of)
- [
- from, 'to', to, 'of', of, 'workitems'
- ].collect { |e|
- e.to_s
- }.join("\n ")
+
+ /\s#{from}\s+to\s+#{to}\s+of\s+#{of}\s/
end
describe 'GET /_ruote/workitems' do
@@ -490,7 +487,6 @@ def workitem_count(from, to, of)
get '/_ruote/workitems.json', :participant => 'jack'
last_response.should be_ok
-
last_response.json_body['workitems'].size.should == 1
end
@@ -499,7 +495,6 @@ def workitem_count(from, to, of)
get '/_ruote/workitems', :participant => 'jack'
last_response.should be_ok
-
last_response.should match(workitem_count(1, 3, 3))
end
@@ -512,7 +507,6 @@ def workitem_count(from, to, of)
get '/_ruote/workitems.json', :hinkypinky => 'honkytonky'
last_response.should be_ok
-
last_response.json_body['workitems'].size.should == 2
end
@@ -528,7 +522,6 @@ def workitem_count(from, to, of)
get '/_ruote/workitems.json', :wands => 101
last_response.should be_ok
-
last_response.json_body['workitems'].size.should == 1
end
@@ -544,7 +537,6 @@ def workitem_count(from, to, of)
get '/_ruote/workitems.json', :hinkypinky => 'honkytonky', :wands => 101
last_response.should be_ok
-
last_response.json_body['workitems'].size.should == 1
end

0 comments on commit 3f7d2c8

Please sign in to comment.