From 4a67b7ae40f284c335ca486ffb567f4c32155f45 Mon Sep 17 00:00:00 2001 From: Courteney Ervin Date: Fri, 6 Mar 2015 22:59:12 -0500 Subject: [PATCH] Add specs for BetaSignupsController --- .../beta_signups_controller_spec.rb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 spec/controllers/beta_signups_controller_spec.rb diff --git a/spec/controllers/beta_signups_controller_spec.rb b/spec/controllers/beta_signups_controller_spec.rb new file mode 100644 index 00000000..0d29dacc --- /dev/null +++ b/spec/controllers/beta_signups_controller_spec.rb @@ -0,0 +1,21 @@ +require "spec_helper" + +describe BetaSignupsController do + include Devise::TestHelpers + + describe "POST #create" do + let(:user) { create(:user) } + before { sign_in user } + + it "is successful" do + post :create, format: :json + expect(response).to be_success + end + + it "saves a new beta_signup to the database" do + expect { + post :create, format: :json + }.to change(BetaSignup, :count).by(1) + end + end +end