Skip to content

Instantly share code, notes, and snippets.

@dr-r3d
Last active January 3, 2016 08:29
Show Gist options
  • Save dr-r3d/8436437 to your computer and use it in GitHub Desktop.
Save dr-r3d/8436437 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe AuthenticateDevice do
describe ".perform" do
it "finds authenticate object with token"
it "authenticates if token is valid"
end
describe ".get_access_token" do
it "finds device with api_key"
context "when device exists" do
it "finds authenticaiton object for device"
context "when authentication object exists" do
it "returns access_token if not expired"
it "generates and returns access_token if expired"
end
context "when authentication object do not exists" do
it "generates and returns access_token if expired"
end
end
context "when device do not exits" do
it "fails"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment