File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,25 +120,25 @@ func TestGetBibleAsk(t *testing.T) {
120120 })
121121
122122 t .Run ("HTML Response Handling" , func (t * testing.T ) {
123+ defer SetEnv ("TELEGRAM_ADMIN_ID" , "12345" )()
123124 ResetAPIConfigCache ()
124125 SetAPIConfigOverride ("https://mock" , "key" )
125126
126127 // Mock SubmitQuery to return HTML
127128 SubmitQuery = func (req QueryRequest , result interface {}) error {
128- if r , ok := result .(* PromptResponse ); ok {
129- * r = PromptResponse {
130- Data : OQueryResponse {
131- Text : "<p>God is <b>Love</b></p>" ,
132- References : []SearchResult {
133- {Verse : "1 John 4:8" },
134- },
129+ if r , ok := result .(* OQueryResponse ); ok {
130+ * r = OQueryResponse {
131+ Text : "<p>God is <b>Love</b></p>" ,
132+ References : []SearchResult {
133+ {Verse : "1 John 4:8" },
135134 },
136135 }
137136 }
138137 return nil
139138 }
140139
141140 var env def.SessionData
141+ env .User .Id = "12345"
142142 env .Msg .Message = "Who is God?"
143143 conf := utils.UserConfig {Version : "NIV" }
144144 env = utils .SetUserConfig (env , utils .SerializeUserConfig (conf ))
You can’t perform that action at this time.
0 commit comments