From 8b5665b857edc460ef6105c3ba0f106dd99a25d5 Mon Sep 17 00:00:00 2001 From: ankonym Date: Thu, 13 Aug 2015 17:24:31 +0200 Subject: Fix test based on actual invite code validation --- test/functional/identities_controller_test.rb | 4 ++++ test/functional/v1/messages_controller_test.rb | 1 + 2 files changed, 5 insertions(+) (limited to 'test/functional') diff --git a/test/functional/identities_controller_test.rb b/test/functional/identities_controller_test.rb index fcdeaa2..c900178 100644 --- a/test/functional/identities_controller_test.rb +++ b/test/functional/identities_controller_test.rb @@ -2,6 +2,10 @@ require 'test_helper' class IdentitiesControllerTest < ActionController::TestCase + setup do + InviteCodeValidator.any_instance.stubs(:not_existent?).returns(false) + end + test "admin can list active and blocked ids" do login :is_admin? => true get :index diff --git a/test/functional/v1/messages_controller_test.rb b/test/functional/v1/messages_controller_test.rb index 6f7ea5d..455eebd 100644 --- a/test/functional/v1/messages_controller_test.rb +++ b/test/functional/v1/messages_controller_test.rb @@ -3,6 +3,7 @@ require 'test_helper' class V1::MessagesControllerTest < ActionController::TestCase setup do + InviteCodeValidator.any_instance.stubs(:not_existent?).returns(false) @user = FactoryGirl.build(:user) @user.save @message = Message.new(:text => 'a test message') -- cgit v1.2.3