Files
app
bin
config
db
docs
lib
log
public
spec
controllers
admin
api
auth
oauth
settings
about_controller_spec.rb
accounts_controller_spec.rb
authorize_follow_controller_spec.rb
home_controller_spec.rb
stream_entries_controller_spec.rb
tags_controller_spec.rb
xrd_controller_spec.rb
fabricators
fixtures
helpers
javascript
lib
mailers
models
services
support
i18n_spec.rb
rails_helper.rb
spec_helper.rb
storybook
streaming
vendor
.babelrc
.buildpacks
.codeclimate.yml
.dockerignore
.env.production.sample
.env.test
.env.vagrant
.eslintrc
.gitignore
.nvmrc
.rspec
.rubocop.yml
.ruby-version
.slugignore
.travis.yml
CONTRIBUTING.md
Capfile
Dockerfile
Gemfile
Gemfile.lock
ISSUE_TEMPLATE.md
LICENSE
Procfile
README.md
Rakefile
Vagrantfile
app.json
config.ru
docker-compose.yml
package.json
scalingo.json
yarn.lock
hometown/spec/controllers/stream_entries_controller_spec.rb

21 lines
655 B
Ruby

require 'rails_helper'
RSpec.describe StreamEntriesController, type: :controller do
render_views
let(:alice) { Fabricate(:account, username: 'alice') }
let(:status) { Fabricate(:status, account: alice) }
describe 'GET #show' do
it 'returns http success with HTML' do
get :show, params: { account_username: alice.username, id: status.stream_entry.id }
expect(response).to have_http_status(:success)
end
it 'returns http success with Atom' do
get :show, params: { account_username: alice.username, id: status.stream_entry.id }, format: 'atom'
expect(response).to have_http_status(:success)
end
end
end