spec/blather/stanza/presence/status_spec.rb in sprsquish-blather-0.4.2 vs spec/blather/stanza/presence/status_spec.rb in sprsquish-blather-0.4.3

- old
+ new

@@ -47,9 +47,16 @@ it 'returns :available if state is nil' do Blather::Stanza::Presence::Status.new.state.must_equal :available end + it 'returns :available if <show/> is blank' do + status = Blather::XMPPNode.import(parse_stanza(<<-NODE).root) + <presence><show/><presence/> + NODE + status.state.must_equal :available + end + it 'returns :unavailable if type is :unavailable' do status = Blather::Stanza::Presence::Status.new status.type = :unavailable status.state.must_equal :unavailable end