Last active
January 3, 2016 08:29
-
-
Save dr-r3d/8436437 to your computer and use it in GitHub Desktop.
This file contains 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
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