spec/blather/stanza/iq/query_spec.rb in blather-0.2.1 vs spec/blather/stanza/iq/query_spec.rb in blather-0.2.2

- old
+ new

@@ -17,16 +17,23 @@ query.query.wont_be_nil query.children.detect { |n| n.element_name == 'query' }.wont_be_nil end - it 'sets type to "reslut" on reply' do + [:get, :set, :result, :error].each do |type| + it "can be set as \"#{type}\"" do + query = Stanza::Iq::Query.new type + query.type.must_equal type + end + end + + it 'sets type to "result" on reply' do query = Stanza::Iq::Query.new query.type.must_equal :get reply = query.reply.type.must_equal :result end - it 'sets type to "reslut" on reply!' do + it 'sets type to "result" on reply!' do query = Stanza::Iq::Query.new query.type.must_equal :get query.reply! query.type.must_equal :result end \ No newline at end of file