spec/unit/trello_wrapper_spec.rb in trollolo-0.0.9 vs spec/unit/trello_wrapper_spec.rb in trollolo-0.0.10

- old
+ new

@@ -45,9 +45,29 @@ it 'memoize board object' do expect(subject.board("myboard")).to be subject.board("myboard") end end + describe '#backup' do + it 'raises an error for empty board id' do + expect { subject.backup("") }.to raise_error(TrolloloError) + end + + it 'raises an error for nil board id' do + expect { subject.backup(nil) }.to raise_error(TrolloloError) + end + end + + describe '#retrieve_board_data' do + it 'raises error when board id is empty' do + expect { subject.retrieve_board_data('') }.to raise_error(TrolloloError) + end + + it 'raises error when board id is nil' do + expect { subject.retrieve_board_data(nil) }.to raise_error(TrolloloError) + end + end + describe '#add_attachment' do use_given_filesystem it "uploads attachment" do srand(1) # Make sure multipart boundary is always the same