diff --git a/lib/vkontakte_api/client.rb b/lib/vkontakte_api/client.rb index e7de617..6341843 100644 --- a/lib/vkontakte_api/client.rb +++ b/lib/vkontakte_api/client.rb @@ -61,11 +61,6 @@ def expired? @expires_at && @expires_at < Time.now end - # Is the token permanent. - def offline? - @expires_at.nil? - end - # Access rights of this token. # @return [Array] An array of symbols representing the access rights. def scope diff --git a/spec/vkontakte_api/client_spec.rb b/spec/vkontakte_api/client_spec.rb index 7d6104f..7c6a740 100644 --- a/spec/vkontakte_api/client_spec.rb +++ b/spec/vkontakte_api/client_spec.rb @@ -88,30 +88,6 @@ end end - describe "#offline?" do - context "with a usual token" do - it "returns false" do - VkontakteApi::Client.new(@oauth2_token).should_not be_offline - end - end - - context "with an offline token" do - before(:each) do - @oauth2_token.stub(:expires_at).and_return(nil) - end - - it "returns true" do - VkontakteApi::Client.new(@oauth2_token).should be_offline - end - end - - context "with a String token" do - it "returns true" do - VkontakteApi::Client.new(@string_token).should be_offline - end - end - end - describe "#scope" do before(:each) do @client = VkontakteApi::Client.new