-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
begin implementing backend encrypted message storage
Signed-off-by: Emily Gordon <[email protected]>
- Loading branch information
Showing
5 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ | |
@title = 'encrypt message'; | ||
haml :encryptMessage | ||
end | ||
|
||
post '/message' do | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require File.expand_path '../spec_helper.rb', __FILE__ | ||
require './app/server' | ||
|
||
RSpec.describe 'Server' do | ||
context 'saving a message' do | ||
it 'exposes a POST route' do | ||
post '/message' | ||
expect(last_response).to be_ok | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'rack/test' | ||
require 'rspec' | ||
|
||
ENV['RACK_ENV'] = 'test' | ||
|
||
require File.expand_path '../../../app/server.rb', __FILE__ | ||
|
||
module RSpecMixin | ||
include Rack::Test::Methods | ||
def app() Sinatra::Application end | ||
end | ||
|
||
RSpec.configure { |c| c.include RSpecMixin } |