Created
December 2, 2009 23:33
-
-
Save davidlee/247722 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context 'unauthorized' do | |
it "ACK an attempt to CONNECT" do | |
result = json_request :command => 'CONNECT', :message_id => 'antarctica' | |
result['command'].should == "ACK" | |
result['message_id'].should == "antarctica" | |
end | |
it "send an ERROR for any message which is not a CONNECT" do | |
result = json_request :command => 'SHOWTABLES', :message_id => 'snoo', :location => 'wibble' | |
result['command'].should == "ERROR" | |
result['error_code'].should == 'NOT_AUTHORIZED' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment