require 'spec_helper'

describe EmailBlacklist do

  let(:user) { FactoryGirl.create(:user) }
  
  describe "#banned" do
    it "returns false if no ban" do
      EmailBlacklist.banned(user).should eq false
    end

    it "returns true if banned" do
      FactoryGirl.create(:email_blacklist, email: user.email)
      EmailBlacklist.banned(user).should eq true
    end
  end
end