mirror of
https://github.com/zhigang1992/tsemple.git
synced 2026-04-29 05:05:25 +08:00
New topic button
This commit is contained in:
@@ -8,9 +8,9 @@ html
|
||||
= csrf_meta_tags
|
||||
|
||||
body
|
||||
.ui.inverted.main.menu
|
||||
.ui.main.menu
|
||||
.container
|
||||
.title.item
|
||||
a.title.item href="/"
|
||||
| Campo
|
||||
.right.menu
|
||||
- if logined?
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
.ui.stacked.segment
|
||||
.ui.grid
|
||||
.middle.aligned.row.two.column
|
||||
.column
|
||||
.ui.huge.breadcrumb
|
||||
.active.section Topics
|
||||
.column.right.aligned
|
||||
a.ui.button href=new_topic_path
|
||||
| New Topic
|
||||
.ui.secondary.pointing.menu
|
||||
a.active.item Hot
|
||||
.ui.grid
|
||||
|
||||
@@ -11,4 +11,6 @@ Rails.application.routes.draw do
|
||||
get :check_username
|
||||
end
|
||||
end
|
||||
|
||||
resources :topics, only: [:new, :create, :edit, :update]
|
||||
end
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
require 'test_helper'
|
||||
|
||||
class TopicsControllerTest < ActionController::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
test "should get index" do
|
||||
3.times { create(:topic) }
|
||||
get :index
|
||||
assert_response :success, @response.body
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user