Skip to content

Commit

Permalink
Add specs for BetaSignupsController
Browse files Browse the repository at this point in the history
  • Loading branch information
courte committed Mar 7, 2015
1 parent cb72f18 commit 4a67b7a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/controllers/beta_signups_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4a67b7a

Please sign in to comment.