Sha256: b1140f5df911030bd79047e7b9994ade3f464fa3dcf14662255d947202224655

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

describe NotificationsHelper do
  let(:user) { User.create(email: "test@example.com"); User.first }

  it "returns the company name for use in notifications" do
    # If this is failing it is because you need to add your company name
    # to app/helpers/notifications_helper.rb
    helper.notification_company_name.should_not be_blank
  end

  it "returns the company address for use in notifications" do
    # If this is failing it is because you need to add your company address
    # to app/helpers/notifications_helper.rb
    helper.notification_company_name.should_not be_blank
  end

  it "returns the company logo for use in notifications" do
    # If this is failing it is because you need to add your company logo
    # to app/helpers/notifications_helper.rb
    helper.notification_company_logo.should_not be_blank
  end

  it "finds recent notifications" do
    helper.stub(:current_user).and_return(user)
    4.times { create(:notification, user: user) }
    helper.recent_notifications.count.should == 3
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
notifykit-0.3.0 lib/generators/notifykit/templates/spec/helpers/notifications_helper_spec.rb
notifykit-0.2.0 lib/generators/notifykit/templates/spec/helpers/notifications_helper_spec.rb
notifykit-0.1.0 lib/generators/notifykit/templates/spec/helpers/notifications_helper_spec.rb