require 'spec_helper'

describe "Receive email" do

	let(:customer) {create :customer}
	let(:fixxpert) {create :fixxpert}
	let(:comment) {create :comment, user: fixxpert, for_user_id: customer.id}

	it "Receive email should be updated as a reply message" do
		email = build :email, from: customer.email, trade: 'Re: New comment from - '+fixxpert.email
		Griddler::Email.new(email).process
		customer.reload
		customer.comments_posted.last.should eq Comment.last
	end
end