mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-30 18:47:51 +00:00 
			
		
		
		
	test: reset Current.user after spec (#8123)
				
					
				
			This commit is contained in:
		| @@ -5,6 +5,11 @@ require Rails.root.join 'spec/models/concerns/assignment_handler_shared.rb' | |||||||
| require Rails.root.join 'spec/models/concerns/auto_assignment_handler_shared.rb' | require Rails.root.join 'spec/models/concerns/auto_assignment_handler_shared.rb' | ||||||
|  |  | ||||||
| RSpec.describe Conversation do | RSpec.describe Conversation do | ||||||
|  |   after do | ||||||
|  |     Current.user = nil | ||||||
|  |     Current.account = nil | ||||||
|  |   end | ||||||
|  |  | ||||||
|   describe 'associations' do |   describe 'associations' do | ||||||
|     it { is_expected.to belong_to(:account) } |     it { is_expected.to belong_to(:account) } | ||||||
|     it { is_expected.to belong_to(:inbox) } |     it { is_expected.to belong_to(:inbox) } | ||||||
|   | |||||||
| @@ -4,6 +4,11 @@ RSpec.describe Macro do | |||||||
|   let(:account) { create(:account) } |   let(:account) { create(:account) } | ||||||
|   let(:admin) { create(:user, account: account, role: :administrator) } |   let(:admin) { create(:user, account: account, role: :administrator) } | ||||||
|  |  | ||||||
|  |   after do | ||||||
|  |     Current.user = nil | ||||||
|  |     Current.account = nil | ||||||
|  |   end | ||||||
|  |  | ||||||
|   describe 'associations' do |   describe 'associations' do | ||||||
|     it { is_expected.to belong_to(:account) } |     it { is_expected.to belong_to(:account) } | ||||||
|   end |   end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Shivam Mishra
					Shivam Mishra