Skip to content

Commit

Permalink
⚗️ More specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranit Harekar committed May 31, 2020
1 parent 2b0dcc3 commit 5f5ff1c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
module Fastlane
module Actions
class CodepushLogoutAction < Action
def self.run(params)
def self.run
Helper::CodepushLoginHelper.logout
rescue
end

def self.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def self.login(login_token)

def self.logout
Action.sh("appcenter logout")
UI.message("✅Logged out successfully")
end

def self.is_logged_in
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions spec/codepush_logout_action_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe Fastlane::Actions::CodepushLogoutAction do
describe '#run' do
it 'prints a message when successfully logged out' do
expect(Fastlane::UI).to receive(:message).with("✅Logged out successfully")
allow(Fastlane::Actions).to receive(:sh).with("appcenter logout").and_return("test")
Fastlane::Actions::CodepushLogoutAction.run
end
end
end

0 comments on commit 5f5ff1c

Please sign in to comment.