Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add list position to registered attributes

  • Loading branch information...
commit 0e2b62c0a40182678d64e6cf2e5dc0ff50fa998b 1 parent 5c8bf2c
@rossta authored
Showing with 6 additions and 1 deletion.
  1. +2 −1  lib/trello/list.rb
  2. +4 −0 spec/list_spec.rb
View
3  lib/trello/list.rb
@@ -1,7 +1,7 @@
module Trello
# A List is a container which holds cards. Lists are items on a board.
class List < BasicData
- register_attributes :id, :name, :closed, :board_id, :readonly => [ :id, :board_id ]
+ register_attributes :id, :name, :closed, :board_id, :pos, :readonly => [ :id, :board_id ]
validates_presence_of :id, :name, :board_id
validates_length_of :name, :in => 1..16384
@@ -28,6 +28,7 @@ def update_fields(fields)
attributes[:name] = fields['name']
attributes[:closed] = fields['closed']
attributes[:board_id] = fields['idBoard']
+ attributes[:pos] = fields['pos']
self
end
View
4 spec/list_spec.rb
@@ -42,6 +42,10 @@ module Trello
it "has a board" do
@list.board.should == Board.new(boards_details.first)
end
+
+ it "gets its position" do
+ @list.pos.should == lists_details.first['pos']
+ end
end
context "actions" do
Please sign in to comment.
Something went wrong with that request. Please try again.